#!/usr/bin/perl -w use Cwd; my $dir = getcwd; print "Would you like to add or remove symbolic links?\n"; my $answer = <STDIN>; chomp $answer; if ($answer eq "add" || "a") { &addlinks; } elsif ($answer eq "remove" || "r") { &rmlinks; } else {exit 0; }
In reply to Subroutines within if statements by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |