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 { } }
In reply to Re: BEGIN and END blocks, use strict and scoping
by dragonchild
in thread BEGIN and END blocks, use strict and scoping
by jkeenan1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |