Re: Error in Script

2004-04-05 Thread David Kirol
You'll need to fix this also > ($str1,$str2) = split(/./, $filetoopen); It should be: ($str1,$str2) = split(/\./, $filetoopen); So that split can funcrion as you expect. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Error in Script

2004-04-04 Thread John W. Krahn
Prabu wrote: > >Hi, Hello, > I have wrote a script to search for a pattern and replace it in > all files of a directory,that i specified at commandline. > I want another one thing is to be done in the script.That's,it should > search only for the type of files I specified at commandline. > T

Re: Error in Script

2004-04-04 Thread Martin Lercher
That's 'cause you have put the question inside the foreach loop: # get all files foreach $file (@allfiles){ $filetoopen = $path ."/" .$file; # filter to check the type of file print "Enter the type of extension:"; my $ext=; Btw, it would be easier to just use the fileglob operator from the start (