#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1180437 use strict; use warnings; $/ = "sample_end\n"; print join ' | ', map { join '!', /sample_char = (.*)/g } <DATA>; __DATA__ sample = 123 sample_sub = info sample_char = abc sample_char = abc1 sample_char = abc2 sample_end sample = 124 sample_sub = info sample_char = bbc sample_char = bbc1 sample_char = bbc2 sample_end sample = 125 sample_sub = info sample_char = cbc sample_char = cbc1 sample_char = cbc2 sample_end
In reply to Re: How can I print part of a line between two different lines
by tybalt89
in thread How can I print part of a line between two different lines
by ramukavuri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |