chomp(my $library = <DATA>); chomp(my $PIN = <DATA>); while (my $line = <DATA>) { chomp($line); if ($line =~ /^library/) { $library = $line; } elsif ($line =~ /^PIN/) { $PIN = $line; } else { print "$library:$PIN:$line\n"; } }
In reply to Re: Need help with line concatenation
by ysth
in thread Need help with line concatenation
by noobee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |