in reply to repetition of qw: syntax error
It would be the kind of syntax where nearly everyone who chose to use it would end up having to read the man page every time, to make sure it really does what they want, and those who see it in someone else's code need to look it up to see what it really does.
Personally, I would be content to use a more mundane -- but non-ambiguous -- approach like:
my @base = qw/foo bar/; my @redup; push @redup, @base for ( 1..5 ); # qw/foo bar foo bar .../ # or for ( @base ) { push @redup, $_ for (1..5) } # qw/foo foo ... bar bar +.../ # or my $redup = join " ", map { "@base" } (1..5) # "foo bar foo bar ..." # etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: repetition of qw: syntax error
by ysth (Canon) on Jun 23, 2005 at 08:16 UTC |