[JaxPM] Yo !

Aaron Johnson solution at gina.net
Thu Sep 26 23:14:10 CDT 2002


On the jacksonville-pm-list; Jax.PM'er Aaron Johnson <solution at gina.net> wrote -

On Thu, 2002-09-26 at 23:21, iudicium ferat wrote:
> On the jacksonville-pm-list; Jax.PM'er iudicium ferat <sneex at bellsouth.net> wrote -
> 
> A small, likely inaccurate, explanation...
> 
> 
> # returns the TYPE of reference, in this
> # case the Ref is pointing to an ARRAY
> 
> $_ = ref \@_;
> 
> 
> # ref \* returns the TYPE of reference, in this
> # case the Ref is pointing to a GLOB
> # STDOUT forces the resulting output of the
> # immediately previous statement, in this case
> # ref \@_ to be part of the "string" being truncated.
> 
> # The -2 characters and the ++$| (which is now 1)
> # causes the Y from ARRAY to be added to the now
> # LowerCased o from GLOB -- which says "Yo"
> 
> print lc substr(ref \*STDOUT, -2, ++$|) . $/ if print chop;
> 
> # What I want Greg to explain is how 'chop' cuts
> # off the beginning of ARRAY (the ARRA portion?)
> 
He isn't chopping it off, he is merely printing only the chop character.
:)

and don't forget the $/ is the default "newline" character to get you a
newline on the console instead of having the prompt against the input,
how cross platform correct :)

> # Cheers! :)
> # -Sx-
> 
> 
> Jax.PM Moderator's Note:
> This message was posted to the Jacksonville Perl Monger's Group listserv.
> The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
> to whom send all praises, complaints, or comments...
> 
> 


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list