On Mon, 04 Apr 2005 20:41:57 +1000 [EMAIL PROTECTED] wrote: > > > I am new to Perl and am trying to code a simple program that will read a > list of files from a text file then present the user with some options > regarding those files (hope that makes some sense). Unfortunately after > much searching/reading on the web and playing around with the code I > have come up with so far I am stuck with the same warning (Use of > uninitialized value in print). > The code I have come up with is below > > #!perl -w > > # File Name = aaaa.pl > # Date Monday, April 04, 2005 > > @files1to5 = (); > $list1 = ""; > open (TEXT, "list.txt") or die "Error. No such file\n"; > @rawtext=<TEXT>; > close(TEXT); > print "\n"; > $list1 = @rawtext; > @files1to5 = split (/\$/, $list1);
Something from this is empty giving you the uninitialized error You have a few lines of list.txt we could have a look at? Owen ps. you might also want to rewrite the script with use strict; You may get some additional help from that. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>