use strict; use warnings; print "Would you like to add or remove symbolic links?\n"; chomp( my $answer = <STDIN> ); if( $answer =~ m{^a(?:dd)?$} ) { addlinks(); } elsif( $answer =~ m{^r(?:emove)?$} ) { rmlinks() } else { exit( 0 ); }
Cheers,
JohnGG
In reply to Re: Subroutines within if statements
by johngg
in thread Subroutines within if statements
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |