[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] How to do variable interpolation in a tr substitution string



In article <20000213150005.B25264@panix2.panix.com>,
"David H. Adler" <dha@panix.com> wrote:
>perl -e '$"=q-Just Another Perl Hacker-; push @x, $_ for (qw+* *+);
>print "@x\n"' #requires perl 5.004_05 or later
>
>I think it still needs some work, but I haven't had time lately...

How about:
perl -e '$,="Just Another Perl Hacker\n";$#x=1;print @x'

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe