Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bengR
  • Order by date
  1. bengR

    Looking for a good Postscript IDE

    Does anyone know of a good IDE for developing Postscript? Something with good syntax highlighting, debugging/viewing stack contents, as well as rendering to screen would be ideal. Code completion would also be nice to have. Thanks.
  2. bengR

    FileName with trailing Pipe

    Two things: 1. First you will need to quote the file name so your shell knows that you are not trying to pipe test.pl's output: ./test.pl "fileOne|" 2. Second, you should use the 3 argument mode of open. Something like: open FILE, '<', $opF or die "$!";
  3. bengR

    Representing character information in a compressed bitmap font

    I am creating a custom compressed bitmap font (class 2) and I need some clarification as to how the character data is represented. Assuming the following character: width - 8 height - 8 binary character data: 01000001 01000001 01000001 01000001 01000001 01000001 01000001 01000001 After...
  4. bengR

    Removing trailing zeros from a float up to and including the '.'

    Thanks prex1. That works great, even on BigFloat numbers.
  5. bengR

    Removing trailing zeros from a float up to and including the '.'

    I am using Active Perl 5.8.8. I am trying to remove trailing zeros from floating point numbers. I also want to remove the decimal point if there is no decimal component. eg 1.100 => 1.1 2.020 => 2.02 3.003 => 3.003 4.000 => 4 This is what I have: { no warnings 'uninitialized'; $_ =~...
  6. bengR

    binary conversion

    Printf will perform decimal to binary conversions without any extra code: #!/usr/local/bin/perl ##open(DAT, "<", "datafile.txt") || die("Could not open file!\n$!\n"); # uncomment when ready open(FILE, ">", "output.txt") || die("Could not open file!\n$!\n"); while (<DATA>) # change to 'DAT'...
  7. bengR

    binary conversion

    What output are you expecting to the file? Do you want to print the same text to the file as is printing to the console? What does "datfile.txt" contain? At first glance it looks like you are doing a lot of unnecessary work shifting bits when printf will convert the numbers to binary...
  8. bengR

    Open and Closing Programs through Command Line

    There is also ImageMagick.
  9. bengR

    Batch printing pdfs to prn files from the command line on Vista

    I am running Adobe Reader version 9.1.0 on Windows Vista Business SP1. I am trying to convert several thousand pdf files into pcl macro overlays by printing to file with an HP LaserJet 4 driver. According to Adobe's support documentation here and here I can run the following command at the...
  10. bengR

    Parsing HPGL Plotter commands - sanity check

    Aha! I knew I was making a silly logic error somewhere! Thank you for your help Annihilannic. I changed peek() to the following, which works as expected: sub peek { my ($nextChar) = @_; my ($pos, $nextRecord); $pos = tell DATA; $nextRecord = <DATA>; seek (DATA, $pos, 0)...
  11. bengR

    Parsing HPGL Plotter commands - sanity check

    Here is a commented version of the code. This should (hopefully) be clearer. (Please note that the offsets will be incorrect now). #! /usr/bin/perl use warnings; use strict; use constant OFFSET => 3_050; { local $/ = \1; my ($pos, $line, $command, $value); # dispatch table...
  12. bengR

    Parsing HPGL Plotter commands - sanity check

    I am running perl v5.8.0 on Windows Vista via ActiveState perl build 824. The following code parses HPGL commands out of a print stream and prints the command's offset in the file, the command, and any parameters. The code compiles without any errors or warnings when I run "perl -c hpgl2.pl"...

Part and Inventory Search

Back
Top