Re: __DATA__ in command line

2009-11-05 Thread 兰花仙子
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 -

Re: __DATA__ in command line

2009-11-05 Thread 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 -e 'while(){ print } >> __DATA__ >> abc >> ' while (defined($_ = )) {

Re: __DATA__ in command line

2009-11-05 Thread John W. Krahn
À¼»¨ÏÉ×Ó 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:

__DATA__ in command line

2009-11-05 Thread 兰花仙子
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.