OK thank you both, I got it.
2009/11/6 Shawn H Corey :
> 兰花仙子 wrote:
>> Hello,
>>
>> doesn't one-liner Perl command support __DATA__ handler?
>> Just found this:
>>
>> # perl -e 'while(){ print }
>>> __DATA__
>>> abc
>>> 123
>>> def
>>> '
>>
>> run without any output.
>>
>
>
> $ perl -MO=Deparse -
兰花仙子 wrote:
> Hello,
>
> doesn't one-liner Perl command support __DATA__ handler?
> Just found this:
>
> # perl -e 'while(){ print }
>> __DATA__
>> abc
>> 123
>> def
>> '
>
> run without any output.
>
$ perl -MO=Deparse -e 'while(){ print }
>> __DATA__
>> abc
>> '
while (defined($_ = )) {
À¼»¨ÏÉ×Ó wrote:
Hello,
Hello,
doesn't one-liner Perl command support __DATA__ handler?
No. It only works in an actual file located on a real file system.
Just found this:
# perl -e 'while(){ print }
__DATA__
abc
123
def
'
run without any output.
You could always do it like this:
Hello,
doesn't one-liner Perl command support __DATA__ handler?
Just found this:
# perl -e 'while(){ print }
> __DATA__
> abc
> 123
> def
> '
run without any output.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.