develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #70357] duff DATA segment in -e

Thread Next
James E Keenan via RT
May 27, 2013 01:07
[perl #70357] duff DATA segment in -e
Message ID:
On Mon Nov 09 08:33:58 2009, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.36 running under perl 5.10.0.
> -----------------------------------------------------------------
> [Please enter your report here]
> $ perl -we $'print <DATA>;\n__DATA__\nfoo\n'
> $

I'm afraid I don't understand the '$' in the above command, i.e., I
don't know what it is supposed to be doing.  And I can't find anything
like that in 'perlrun'.

Can you clarify?

> In -e, the __DATA__ token marks the end of the Perl code, as usual,
> but the following characters are not available in the DATA filehandle.
> However, the DATA filehandle does exist, unlike what happens if
>    __DATA__
> (and following data) don't appear at all.  The abstraction is leaking.

Thank you very much.
Jim Keenan

via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About