Perl File::Copy to Samba share

2006-05-12 Thread Sonika Sachdeva
Hi List, I have a perl program scheduled to do some processing and generate output as .zip files ( activeState perl on WinXP) Now the last part of the program moves .zip files from c:\ to samba share 'S:\' Though there is no error reported , but it actually doesn't move the files. What could be

Re: Perl regular exp

2006-04-12 Thread Sonika Sachdeva
Thanks all. On 12 Apr 2006 06:23:53 -0700, Randal L. Schwartz wrote: > > >>>>> ""Ankur" == "Ankur Gupta" <[EMAIL PROTECTED]> writes: > > "Ankur> Sonika Sachdeva <mailto:[EMAIL PROTECTED]> scribbled on > Tuesday, &g

Re: Perl regular exp

2006-04-11 Thread Sonika Sachdeva
TED]> wrote: > > Sonika Sachdeva wrote: > > $str1=shift; > > $str2=shift; > > $str3=shift; > > > > my $querystring="$str1 && $str2 && $str3"; > > > > foreach (@LINES){ > > push @output,$_ if /$querystring/ ; >

Re: Perl regular exp

2006-04-11 Thread Sonika Sachdeva
words to match are variable e.g array @words On 4/11/06, Sonika Sachdeva <[EMAIL PROTECTED]> wrote: > > $str1=shift; > $str2=shift; > $str3=shift; > > my $querystring="$str1 && $str2 && $str3"; > > foreach (@LINES){ > push @outpu

Re: Perl regular exp

2006-04-11 Thread Sonika Sachdeva
$str1=shift; $str2=shift; $str3=shift; my $querystring="$str1 && $str2 && $str3"; foreach (@LINES){ push @output,$_ if /$querystring/ ; } does not work even if I have @LINES containing all 3 words. Thanx, On 4/11/06, Peter Cornelius <[EMAIL PROTECTED]> wrote: > > What do you me

Re: Perl regular exp

2006-04-11 Thread Sonika Sachdeva
How do I use variable string value as a regular expression? On 4/11/06, Oliver Block <[EMAIL PROTECTED]> wrote: > > Am Mittwoch, 12. April 2006 00:38 schrieb Sonika Sachdeva: > > my $regex="$pattern1 && $pattern2 && $pattern3"; > > print

Perl regular exp

2006-04-11 Thread Sonika Sachdeva
Hi , print $line if ($line =~ /pattern1 && pattern2 && pattern3/); works .. but my $regex="$pattern1 && $pattern2 && $pattern3"; print $line if ($line =~ /$regex/); doesn't work... Any clues ? Thanks,

Web Interface for Perl programs

2006-04-10 Thread Sonika Sachdeva
Hi list, I have written some small perl programs for the ftp to site, getting the data n metadata, processing it and generating the status in a text file. Now i need to have a web interface to this. so i have few questions: 1. perl - cgi or php? 2. how do i execute the perl programs on a different

Net::SMTP module

2006-04-03 Thread Sonika Sachdeva
What is the correct method to authenticate for sending mails , I found auth(). But its not working...

perl XML::Simple parsing for keyword

2006-03-29 Thread Sonika Sachdeva
Hi, I want to search for one or more "filename.mpg" from the xml files which I am parsing using XML:Simple. It may or maynot be there. sub parsexml { my $xml=shift; my $config = XMLin($xml,keyattr=>[Name]); my $A = $config->{' X '}->{'Y'}->{'A'} ; my $B = $config->{'X'}->{'Y'}->{'B'} ; my $C =

Perl Hash of arrays : comparison

2006-03-21 Thread Sonika Sachdeva
Hi, I have Hash of array. I want to compare the array values within the hash. How can it be done? if ($eline =~ /$pattern/ ) { $eline =~ /(.*)\"(\w+)\s(.*)\?(.*)\"/ ; my $uniq=$1; my $url=$4; chomp($uniq);chomp($url); my @var= ( split("&",$url) );

printing die error ina file

2006-03-19 Thread Sonika Sachdeva
Hi I need to run my perl program from Windows scheduler.I have printed most of the errors in a Log file, except for die " " errors. How do I log die errors and exit nicely. one example is .. my $result=open(VF, ">>$SRCDIR\\$Verbosefile") ; unless($result) {print "Error: can't append to $Verbo

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
Thanks for the pointers. On 3/16/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > > Hello, > > > > > Please try to write cleaner code, its hard to read :) (See "Perl Best > Practices" by Damian Conway, Oreilley) > > > > > undefined subroutine &main::copy > > > > What could be the mistake? > > a)

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
It works . Thank you all. On 3/16/06, Sonika Sachdeva <[EMAIL PROTECTED]> wrote: > > Thanks for your response. > > I did change the module name. It works but now it hangs at the copy > command without giving any warning/error. ( plz refer the code) > > > thanks, >

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
u want. > Dp. > > > On 16 Mar 2006 at 9:53, Sonika Sachdeva wrote: > > > Hi All, > > > > I have used FILE::copy , perl syntax check is OK. > > and am getting the following error when it tries to perform the copy > > function . This is on windows syst

FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
Hi All, I have used FILE::copy , perl syntax check is OK. and am getting the following error when it tries to perform the copy function . This is on windows system. my $retval=system("perl \"$SCRIPTDIR\\test.pl\" $FILEHASH{$filename}[3]") ; if($retval != 0) { print LOGHANDLE "Error while e

Re: Perl fork or system

2006-03-15 Thread Sonika Sachdeva
thank you all. On 3/15/06, Ad Ministrator <[EMAIL PROTECTED]> wrote: > > Sonika Sachdeva <[EMAIL PROTECTED]> wrote: > >Hi, > >thanks for the response, > > > >thats right , system function will block till the command is complete > > > >

Re: Perl fork or system

2006-03-15 Thread Sonika Sachdeva
system function will block until processing is complete. > > On Wed, 2006-03-15 at 10:21 -0800, Sonika Sachdeva wrote: > > Hi, > > > > I need to run " perl sample.pl $filename " from a perl program . The > output > > is a zip file which needs to be processed

Perl fork or system

2006-03-15 Thread Sonika Sachdeva
Hi, I need to run " perl sample.pl $filename " from a perl program . The output is a zip file which needs to be processed further. Now the issues are: 1. this execution takes around 10-15 mins and i need to wait for it to complete bfore i start the next execution with a new filename. 2. get hold

Re: cpan module installation using Activestate perl package manager

2006-03-14 Thread Sonika Sachdeva
ECTED]> wrote: > > perl -MCPAN -e "install FILE::TAIL" > > -----Original Message- > From: Sonika Sachdeva [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 14, 2006 11:06 AM > To: beginners@perl.org > Subject: cpan module installation using Activestate perl packa

cpan module installation using Activestate perl package manager

2006-03-14 Thread Sonika Sachdeva
Hi, How do i install FILE::TAIL using activestate perl doing a search using perl package manager doesnt show File::Tail module in its repository thanks,

Re: Perl script to read IIS ftp log file

2006-03-13 Thread Sonika Sachdeva
wrote: > > > > Sonika Sachdeva wrote: > > Hi, > > > > How to read every new file transfer made from the IIS ftp log file. > > This will be continous file reading process to know the status of every > > successful file transfer to the server. > > > >

Perl script to read IIS ftp log file

2006-03-13 Thread Sonika Sachdeva
Hi, How to read every new file transfer made from the IIS ftp log file. This will be continous file reading process to know the status of every successful file transfer to the server. Thanx,