Hi there! Iam on my task with my shell...
At this time I have written exactly this code :
#!/usr/bin/perl -w
print $ENV{'HOMEPATH'};
print ">";
chomp($newdir = <stdin>);
chdir($newdir) ||
die "cannot chdir to $newdir: $!";
opendir(DOT, ".") ||
die "cannot open dir . $!";
foreach (sort readdir(DOT)) {
print "$_\n";
}
closedir (DOT);
the program starts in my home catalog..I also can list the directories in my system. But if I want to execute one of my program how I do then??
Iam a complete noob the programming so easy answers are appreciated =)
/ Thanks