in reply to Perl with a Samba mount

If the network is the issue why not just run the script locally on the Win32 box rather than via the Samba mount?

Given that you are doing intesive file I/O I don't understand why you think that Perl operations using local disk access (probably running at at least 20-30 MegaBytes/sec) should not be a hell of a lot faster than over your network (probably 20-30 MegaBits/sec in the real world over 100 base T). In fact I would be AMAZED if it did not take at least 10 times longer over the network - it is simply a function of data transfer rates.

As has been noted by others without code this is about all I can offer.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Perl with a Samba mount
by fletcher_the_dog (Friar) on Jan 06, 2003 at 16:16 UTC
    Here is some code. Both the input and output directories are on the samba mount. Functions 1 and 2 do some string manipulation, but don't touch the file system. The $list_file is a file that starts with a path to a directory and then is a list of files. Thank you for your input.
    my $list_file=$ARGV[0]; my $outdir=$ARGV[1]; my $file_name; my $text; open LIST,$list_file; chomp(my $path=<LIST>); while($file_name=<LIST>) { chomp $file_name; local $/=undef; open INFILE,catfile($path,$file_name); $text=<INFILE> close INFILE; my $string=function1($text); function2($text); my $bindex=index($text,"<XML_TAG>"); $text=substr($text,0,$bindex). "<XML_TAG>\n". $string."\n". "</XML_TAG>\n". substr($text,$bindex); open OUT,'>'.catfile($outdir,$file_name); print OUT $text; close OUT; }