Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: (jeffa) GOLF Re: Quine??

by ChOas (Curate)
on Mar 08, 2002 at 14:51 UTC ( #150335=note: print w/replies, xml ) Need Help??


in reply to Re: (jeffa) GOLF Re: Quine??
in thread Quine??

# 1 2 #2345678901234567890 @ARGV=$0;print<>

Or... for unix:
# 1 2 #2345678901234567890 system cat,$0

GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;

Replies are listed 'Best First'.
Re: Re: Re: (jeffa) GOLF Re: Quine??
by Juerd (Abbot) on Mar 08, 2002 at 22:03 UTC

    system cat,$0

    #23456789_1 exec cat,$0 #23456789_12 # newline is required ;) die`cat $0`

    44696420796F7520732F2F2F65206F
    7220756E7061636B3F202F6D736720
    6D6521203A29202D2D204A75657264
    

Re: Re: Re: (jeffa) GOLF Re: Quine??
by myocom (Deacon) on Mar 08, 2002 at 21:52 UTC
    Or, same number of strokes, but TMTOWTDI:
    # 1 2 #2345678901234567890 print`cat $0`
    "One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150335]
help
Chatterbox?
[GotToBTru]: you can always have ${${${$array[0]}{ key1}}[1]}{key2}
[GotToBTru]: I think I have that inside out .. but you get the point
[choroba]: $array[0]{key1}[1] {key2}
[thepkd]: ??
[GotToBTru]: I would think temporary variables would help in making the real life meaning of your structure clear
[choroba]: the problems start when you want to "skip a level", i.e. the arrays for all the keys
[LanX]: what are temps?
[moritz]: oh, the question was about creation, not indexing
[thepkd]: temporary variables
[moritz]: [ { a => [ { b => 1 } ] } ]

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2016-12-06 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.