in reply to A maybe rather silly question...
The split function seems the simplest approach to me:
#! /usr/bin/perl while(<DATA>) { my @field = split " ", $_; print "Field 2 => ",$field[1], "\n"; } __DATA__ ID SP96_DICDI STANDARD; PRT; 600 AA.
And the output is:
C:\scripts>perl field_split.pl Field 2 => SP96_DICDI
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A maybe rather silly question...
by Anonymous Monk on Feb 27, 2014 at 20:28 UTC |