in reply to reading from a file and splitting

First of all, you need to open the file in question, after that, you need to use regular expressions to match the thing you're looking for (please do follow that link and read the POD). And after all, close the file. This all can look like this:

open(FILE, "<$file") || die ("Can't open $file: $!"); while(<FILE>) { print $1 if ($_ =~ /^hi==(.*)/); } close FILE;

A little more information on this. Line one opens the file, specified in $file, or dies with the error message. Line to says: while we loop through the lines of the file, do this block (that starts with { and ends with }). Line three is your magic.See the documentation for more on this "magic". It states: print $1 (the result of the coming lookup) if the current line ($_) equals "hi==" and anything after that will be what we want ($1). And of course, we close the block and file after that.

HTH

Update: reformated several things, for I can not read questions, or so it seems :(

--
b10m