Hi, > well, your line, > $list1 = @rawtext; ( using the above as list.txt) means > > $list1 is the number of lines in @rawtext which is 5. > > Then you want to go and split that value, 5 on non existant $ delimiters. > > So the next question is "What are you expecting from your split operation?
Ughhh, now im even more confused, sorry. Eventually the text file will have a range of other data in it, which will not be selected using the split in the code, when I first noticed this error I took that text out. What i want the split to do is select only the text in between the $, then with the rest of the code print to screen the name of the text file selected. Are you saying the line of code you pointed out replaces the contents of the array with "5" & as a result there are no $ deliminiters to split with (please excuse my newbieness here). Now I think about it that seems to make sense as it's a scalar variable! If so, what should be the format of the next line, taking into account the rest of the code? @files1to5 = split (/\$/, $list1); The format of a split as I understand it is @array = split / expression to split at /, string to be split; So I guess if I could split my array that would be simpler but I don't believe that's possible. > > D:\My Documents\Perl>aaaa.pl > > Global symbol "@files1to5" requires explicit package name at D:\My > > Documents\Per > > l\aaaa.pl line 7. > > Global symbol "$list1" requires explicit package name at D:\My > > Documents\Perl\aa > > aa.pl line 8. > > You actually need to explore the usage of strict. It sort of makes global or > local variables and every variable must be so assigned by using 'my' for the > most part. > > Have a look at http://www.perl.com/pub/a/2001/01/begperl6.html#use%20strict > as a starter. > > However if you don't quite understand it, not using it will not be the end of > the world. Thanks for that link. Ive bookmarked it & will read tomorrow morning. It's difficult for me to understand most things so late at night :) -- [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>