in reply to Re: How can I print part of a line between two different lines
in thread How can I print part of a line between two different lines
#!/usr/bin/perl -w
open IN, "data";
while($file=<IN>)
{
@line = split(/ \= /,$file);
if ($line[0] =~ m/^sample$/g)
{
@sample = $line[1];
foreach (@sample)
{
print @line; unable to proceed from here
}
}
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How can I print part of a line between two different lines
by madtoperl (Hermit) on Jan 27, 2017 at 14:09 UTC |