in reply to shift split grep question
Please clarify. :)
use strict; use warnings; use Data::Dump qw/pp dd/; my @lines =<DATA>; my @headings = grep /^\s*AUID/, @lines; @headings = split ' ', $headings[0]; shift @headings; pp @headings; __DATA__ AUID \cIRA \cIDec \cILabel \cIV \cIB-V \cIComments AUID \cIRA \cIDec \cILabel \cIV \cIB-V \cIComments AUID \cIRA \cIDec \cILabel \cIV \cIB-V \cIComments
( "\\cIRA", "\\cIDec", "\\cILabel", "\\cIV", "\\cIB-V", "\\cIComments", )
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: shift split grep question
by haukex (Archbishop) on Nov 25, 2018 at 19:25 UTC |