[Israel.pm] how do i cut the first 2 characters/digits of a string?

Gaal Yahas gaal at forum2.org
Thu Jul 15 05:09:47 PDT 2004


On Thu, Jul 15, 2004 at 02:41:39PM +0300, Gabor Szabo wrote:
> >      chop($_ = reverse); chop; $_ = reverse
> >
> > And a riddle!
> >
> > Why does this:
> >
> >      chop($_ = reverse); $_ = reverse chop
> >
> > not do the same thing?
> 
> Using the return value of chop ?

Yup :)

Simple enough to be a stumper, if you're not appropriately caffinated.

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list