in reply to Script doesn't enter while loop.
If your file doesn't have any \n delimiters and you want to read it all in one slurp, tell Perl not to stop when reading:
undef $/; $file_data = <FILE>; # That pulled it all in close FILE;
BTW, This statement: while (<FILE>) {is reading the (single) line from your file and assiging it to $_. The body of the while tries to read from the file a second time. Remember that the <> operator reads data in addition to checking for EOF.
HTH
|
|---|