in reply to PERL newbie Cant figure out where to start

First think filehandles. And you will need to see the listing of << < >> > +<< etc. I think it is easier to deal with chunky bits of text, run some regex etc. The while{} is initializing $line with a chunk of new text terminated by \n (and carriage return linefeed I think). If I had an address in variable $content like .. = "c:/temp/text.txt" then open would have open(my $fh1, "<", $content). If I wanted to actually parse the contents of a variable like $content = "a lot of text strings etc packed in a variable" then I would send a reference like open(my $fh1, "<", \$content). Make sure you close it when done. open(my $fh1, "<", \$content) or die('can not open content'); while (my $line = <$fh1>) { do something with $line } close($fh1);
  • Comment on Re: PERL newbie Cant figure out where to start