#!/bin/perl5 use strict; use warnings; my $dollars; while (<DATA>){ chomp; if ($dollars){ s/^line(\d+)/name$1/; $dollars-- } print "$_\n"; $dollars++ if /\${4}/ } __DATA__ #something $$$$ line1 #something $$$$ line2
In reply to Re: $/ find a line
by wfsp
in thread $/ find a line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |