I am using an array to set values for a select lists in HTML. I have 10 select lists that are being passed the array called "@subtotaloptions_avail" or "@subtotaloptions_sel" with a 1-10 at the end of the array.
I am looping through available options and adding them to the array, however, I...
I am using the GD module, and to write the image, it requires that I change to binary mode.
Imager is another module that allow me to open the image and save it as another format.
I am opening images and saving them above the code I inserted, and that works fine.
And, no, I am not exactly...
I am fairly new to this, so please bear with me.
I believe that I am using another file handle. Please see the code below.
binmode STDOUT;
# Convert the image to PNG and send it to a file.
my $PNG = new IO::File "> $epod_file";
print $PNG $im->png(0);
close($PNG);
my $epod_file2 =...
I have a perl script where I am writing a file using regular ascii mode, then I need to write anther file using binmode. This all workd fine. Now I want to open another file read it, and write it again (using ascii mode).
How do I change back to ascii mode once in binmode?
Just as an FYI - I ended up buying a third party solution called PDFlib to create the PDF file. Then I was able to setup the page design and insert images. It's a pretty handy tool.
I am looking for the best way to remove leading zeros from numbers.
For example I have the following numbers:
0032104595
0159789956
0001649850
1234859782
I need to remove leading zeros so the numbers end up to be:
32104595
159789956
1649850
1234859782
Any assistance would be appreciated.
Since I am new to all of this, I will need some direction.
I found a module that will create labels and put the result in a PostScript file. My problem with that is that our users will not be able to see the file and save it, before they print it. That is why I was leaning to a PDF file...
I am needing to create shipping labels that will always be the same. The user enters the information that will be on the label and selects the location where the label starts on a 6 label page. The user also indicates how many labels they need to print. This label must have different text...
I am wanting to delete a file that is on a mounted file system. The file resides on another computer, but can be accessed through the mount.
I have tried unlink, but that doesn't remove the file.
I am rather new to Perl so any suggestions are appreciated.
I am new to perl, and am trying to check if the data entered is a string or numeric. IE if the person entered a Postal Code or Zip Code.
Could someone assist me? Thanks!
Thank you both for your help. I figured out what I needed:
if (! (($ARGS{mileage} =~ /^\d\.\d$/ ) | ($ARGS{mileage} =~ /^\d\d\.\d$/ ) | ($ARGS{mileage} =~ /^\d\d\d\.\d$/ ) | ($ARGS{mileage} =~ /^\d\d\d$/ )))
because the person can enter 123 or 1.2 or 12.3 or 123.4 but not 123.45.
Thanks again!
Ok, that worked for 123.45, but it still allows 1234 or 12.23. Any suggestions?
I am trying to validate that the number can have 3 digits before the decimal point and one after.
Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.