Update: In 5.10 you can write:die "FOO was not intended to run on OS $^O\n" unless defined($foo_path);
You might even be able to factor the assignment to $file_path to outside the given statement -- gotta get 5.10 installed and try it out.given ($^O) { when (/linux/) { $file_path = '/mnt/foo' } when (/mswin32|nt/) { $file_path = '\\\C:\foo.exe' } default { die "FOO was not intended..." } }
In reply to Re: Using UNDEF
by pc88mxer
in thread Using UNDEF
by neo1491
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |