in reply to Re: Re: Re: Shell v Perl
in thread Shell v Perl, here-doc as stdin
Short answer: No:
#!/usr/bin/env perl eval { sub test { my $buffer =<<"/\s*END/"; Eins Zwei END return $buffer; } print test(); }; if($@) { print $@; } print "\ndone\n"; __END__ Can't find string terminator "/\s*END/" anywhere before EOF at test.pl + line 3.
Longer answer in perlfaq4 as answer to the question "Why don't my <<HERE documents work?".
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|