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

Re: Re (tilly) 2: (Golf) JAPH?

by dws (Chancellor)
on May 17, 2001 at 05:58 UTC ( #81148=note: print w/replies, xml ) Need Help??


in reply to Re (tilly) 2: (Golf) JAPH?
in thread (Golf) JAPH?

Not quite. You need the "\n" at the end of the die() argument to keep it from spitting out the filename (again) and line number.

Replies are listed 'Best First'.
Re (tilly) 4: (Golf) JAPH?
by tilly (Archbishop) on May 17, 2001 at 14:50 UTC
    I didn't miss that detail. Here is a Perl program that both writes and runs the script under Unix:
    my $filename = "Just another Perl hacker,\n"; open (OUT, "> $filename\0") or die "Cannot write '$filename': $!"; print OUT 'die$0'; close OUT; system "perl '$filename'";
    Do you see where the return is coming from now?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81148]
help
Chatterbox?
[marioroy]: Wow. It's cool seeing Github coments "Update Monster.pm, Create Wild_hairs, Create alternate- PurpleOnGreen..., Then a location, Create Aleenia. Amazing, really. Thank you for sharing.
Discipulus when naming is clear and you know how to arrange the data, then coding it is a mere writing work

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-05-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?