foreach my $line (split /^/, $text) { print $line; my $separator_printed = 0; foreach ($line =~ m/\[.*?\]\[(.*?)\]/g) { my $link_number = $_; $separator_printed++ or print "\n"; print grep(/(\[$link_number\]\:.*)/, @url_list); print "\n"; } }
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
In reply to Re: Preventing Blank Lines Between Printed Array Elements
by NetWallah
in thread Preventing Blank Lines Between Printed Array Elements
by immamanatee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |