Joe_ has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I know next to nothing about perlguts so I'm having a hard time understanding the behavior of Perl in a certain scenario.
When I run the following code:
The script file is deleted but the print statement executes! Can you please demystify this for me?#!/usr/bin/perl unlink $0; print "Hello, afterworld!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help Explain Behavior
by BrowserUk (Patriarch) on Aug 18, 2012 at 23:31 UTC | |
by Joe_ (Beadle) on Aug 19, 2012 at 17:22 UTC | |
by BrowserUk (Patriarch) on Aug 19, 2012 at 18:00 UTC | |
by Joe_ (Beadle) on Aug 19, 2012 at 19:32 UTC | |
|
Re: Help Explain Behavior
by LanX (Saint) on Aug 18, 2012 at 22:22 UTC | |
by Joe_ (Beadle) on Aug 19, 2012 at 17:20 UTC | |
by LanX (Saint) on Aug 20, 2012 at 21:45 UTC | |
|
Re: Help Explain Behavior
by chromatic (Archbishop) on Aug 18, 2012 at 22:22 UTC | |
by Joe_ (Beadle) on Aug 19, 2012 at 17:21 UTC |