I am newbie in perl, how can I change the current working directory in terminal also using perl. I want to provide input from terminal, so it will take respective dir.
use Cwd;
my $in1 = shift;
my $in2 ="/usr/swarak/scripts/dir";
my $str = $in2.$in1;
print "$str\n";
chdir "$str";
print(cwd);
this is changing the present script executing dir, I want to change the Linux terminal also.
OUTPUT: if I give 1, it should take me /usr/swarak/scripts/dir1, if I give 99, /usr/swarak/scripts/dir99.
I have lost of dir, so want this simple shortcut.