Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Variation on a (JAPH) theme

by jdalbec (Deacon)
on Dec 07, 2004 at 03:12 UTC ( [id://412819]=note: print w/replies, xml ) Need Help??


in reply to Variation on a (JAPH) theme

Some documentation, some code modifications to try:
s oohaa ctkseurjogis; #print "$_\n"; s ii rpeehrtlo nisom; #print "$_\n"; +$ -= + split $ +; ; =pod split In scalar context, returns the number of fields found and splits into the @_ array. Use of split in scalar context is deprecated, however, because it clobbers your subroutine argu- ments. $- The number of lines left on the page of the currently selected output channel. Used with formats. (Mnemonic: lines_on_page - lines_printed.) =cut #$\ = $/; do {local $\; print "$- "}, print + splice @ ## ; _ => + $ ---, $ ++ 1 while + $ ---- $ ++ @ _
In My 1st post (japh) I saw 0-1=1 using $|. Now I see 0-1=0 using $-. You and blazar should write a tutorial on "special properties of special variables".

Replies are listed 'Best First'.
Re^2: Variation on a (JAPH) theme
by blazar (Canon) on Dec 10, 2004 at 13:38 UTC
    Indeed I discovered the special property of $| while developing that JAPH. Someone pointed out that it's well known to golfers who often spot it to alternate between two values...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412819]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found