HEREDOC tricks, etc.
am 28.10.2007 22:13:50 von rvtol+news# does Perl need a qs-operator?
perl -wle '
my $s = join $", qw<
ab
cde
f
ghijk
>;
print $s;
'
ab cde f ghijk
# bash -HEREDOC alike:
perl -wle'
(my $s = <
cde
f
ghijk
EOS
print $s;
'
ab
cde
f
ghijk
# qw-emulation
perl -wle'
my @s = split " ", <
cde
f
ghijk
EOS
print "<$_>" for @s;
'
(the above occurences of <
--
Affijn, Ruud
"Gewoon is een tijger."