[rochester-pm-list] Script won't run on Perl Version 4 :-(

Pat havoc at shell1.eznet.net
Fri Mar 3 08:33:46 CST 2000


On Fri, Mar 03, 2000 at 08:52:39AM -0500, Charles Rishel wrote:
> Hi everyone,
> 
> About 2 weeks ago I posted a script that I made to delete image files from a directory, reading the list of files to delete from a text file.
> This works beautifully on Perl Version 5, which one of our web-servers uses, and I have ActivePerl V5 on the Windows machine to automate
> the process on my workstation.  But our other web-server is utilizing Perl Version 4, and the script aborts at line 22 (at the call for chomp(  )
> and I have no clue of the differences between Perl V4 and Perl V5.  If anyone can provide me with some pointer as to where I can find the 
> information that I need to fix this problem, I would be very grateful.

Replace chomp with chop and you're program should work fine.
The difference is minor in your case.
chomp => remove trailing newlines
chop => removes last character

I didn't see any other problems with your program in a brief look.

You might try perl 4 to 5 traps at http://language.perl.com/all_about/perl425.html for more details.

Also, perl4 is old and unsupported, upgrading to perl5 is your best bet!

--Patrick Ludwig

-
For information on unsubscribing from this list, please visit http://rochester.pm.org



More information about the Rochester-pm mailing list