Welcome to WebmasterWorld Guest from 18.104.22.168
Usually, one would open a file and assign each line using <> as below:
open(DAT, $data_file) ¦¦ die("Could not open file!");
But for my case, I don't have a file which I'm opening, just a very long variable $source. So, I want to do something like:
@source = <$source>
But obviously, that is incorrect syntax.
That will give an array with one line of code per entry.
(NB that should work for pages stored in *nix format. For Windows files you might have to use a more complicated regex to deal with the \r carriage returns as well as the \n newlines...)