Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Extracting selected fields form file recordby LanX (Saint) |
on Feb 06, 2022 at 18:31 UTC ( [id://11141173]=note: print w/replies, xml ) | Need Help?? |
another way is filling in undef for the ignored fields my ($first,$second,undef,$third,undef,$fourth,undef,$fifth,undef,$sixth) = split / /, $line; please also note that split operates on regexes, so /\s+/ might be what is really wanted.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|