Gossamer Forum
Home : General : Perl Programming :

Need help again ! plz help ~

Quote Reply
Need help again ! plz help ~
To all expert & pro,

i need to write another script...that can perform a function as below .... :

my script will prompt user to enter the file/filename to be us as input. Its mean like, the script will ask user, which file u would like to choose as input ? then user will choose a file, and key in the filename. So my script will open the file and use it as input for futher progress. Then later it will use the information on that file to perform more task ....so basically, how can i perform the previous request ? is it possible ??

Thanks for advice !~
Quote Reply
Re: [nsync] Need help again ! plz help ~ In reply to
my $filename;
do {
print 'File name: ';
chomp ($filename = <STDIN>);
} while (!exists ($filename));
# There are better ways to do it... but this works

parsefile ($filename);

Something like that?