Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

You learn something new every day...

by quidity (Pilgrim)
on Aug 05, 2002 at 22:22 UTC ( #187846=obfuscated: print w/replies, xml ) Need Help??

$;=sub{print shift},"Just another Perl hacker\n"->$;;

Replies are listed 'Best First'.
Re: You learn something new every day...
by domm (Chaplain) on Aug 06, 2002 at 08:33 UTC
    Yes, very nice indeed!

    Two comments:

    • You can ommit the last ; (unless you put it there deliberatly to have two semicolons)
    • If you need to do something with an array that contains only one values, use pop instead of shift. This is not only shorter (think Golf), but also less used than shift and thus a little bit more obfuscated..
    i.e.: $;=sub{print pop},"Just another Perl hacker\n"->$;
    -- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Re: You learn something new every day...
by BUU (Prior) on Aug 06, 2002 at 05:27 UTC
    your calling the annonymous sub 'print shift' on te class "just another perl hacker";. tricky.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://187846]
Approved by Ovid
[muthusathish]: i dont have source code too
[muthusathish]: it is used in VB 6 appln, while debugging is getting error
[hippo]: Somebody has. Ask the author.
[Eily]: muthusathish ok, the fact that you can't tell what perl has to do with it proves it: this is not perl

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2018-02-23 09:20 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (301 votes). Check out past polls.