in reply to BEGIN and END blocks, use strict and scoping
As for your goal, why not do something like:
#! perl use strict; my $filename = 'C:/shb'; my $action; if ( -f $filename ) { $action = 'rename'; } else { $action = 'create'; } END { if ($action eq 'rename') { } else { } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: BEGIN and END blocks, use strict and scoping
by jkeenan1 (Deacon) on Sep 24, 2005 at 13:24 UTC | |
by dragonchild (Archbishop) on Sep 25, 2005 at 02:51 UTC |