in reply to Re: Split lines in file to columns
in thread Split lines in file to columns
You can put your data after the _END_ statement
Normally, one would use the __DATA__ token for this purpose - see Special Literals in perldata.
Update: Another nitpick: The special variables $1 etc. should only be used if the match succeeds. And the two lines could be shortened to: my ($col1, $data_b, $xyz, $description) = /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/ or die "Failed to parse: $_";
|
|---|