network program for copying file from a remote machine

2009-02-26 Thread Anirban Adhikary
Dear list I want to write a program which can copy files from remote machine ( like scp) using perl network programming.Is it possible to create such program? If yes then can you give me some examples or tutorials web site name from where I can proceed. Thanks Regards Anirban Adhikary.

Re: network program for copying file from a remote machine

2009-02-26 Thread Yogesh Sawant
On Thu, Feb 26, 2009 at 1:47 PM, Anirban Adhikary anirban.adhik...@gmail.com wrote: Dear list I want to write a program which can copy files from remote machine ( like scp) using perl network programming.Is it possible to create such program? how about using CPAN module Net::SCP -

Re: Simplify a script which copies files

2009-02-26 Thread Yogesh Sawant
On Wed, Feb 25, 2009 at 6:14 PM, Lauri Nikkinen lauri.nikki...@iki.fiwrote: Hi, I wrote a script which copies files in directory to an another directory based on user input. Any suggestions to simplify or shorten this? I'm using Win XP. instead of accepting inputs from user, how about

Re: network program for copying file from a remote machine

2009-02-26 Thread Anirban Adhikary
I am not able to use any module . On Thu, Feb 26, 2009 at 2:05 PM, Yogesh Sawant y.saw...@gmail.com wrote: On Thu, Feb 26, 2009 at 1:47 PM, Anirban Adhikary anirban.adhik...@gmail.com wrote: Dear list I want to write a program which can copy files from

Re: Simplify a script which copies files

2009-02-26 Thread Lauri Nikkinen
Thank you for your reply. Yes, I was also thinking that, thanks. -L 2009/2/26 Yogesh Sawant y.saw...@gmail.com: On Wed, Feb 25, 2009 at 6:14 PM, Lauri Nikkinen lauri.nikki...@iki.fi wrote: Hi, I wrote a script which copies files in directory to an another directory based on user input.

regarding hash

2009-02-26 Thread Irfan Sayed
Hi All,   I have sorted one array in ascending order. Now i want to store that sorted output (key/value pair ) in new hash. How can i do that. Secondly, i want to delete the first occurence of key/value pair.   Please help   Regards irf.

regarding regular expression

2009-02-26 Thread Irfan Sayed
Hi All,   I have a string like this pqp-un_1.0G_2009-02-23_17-38-09_5678903.txt now what i need is only all digits before .txt till first underscore.   which means i need only output as 5678903   please please help.   Regards Irfan.  

Re: regarding regular expression

2009-02-26 Thread John W. Krahn
Irfan Sayed wrote: Hi All, Hello, I have a string like this pqp-un_1.0G_2009-02-23_17-38-09_5678903.txt now what i need is only all digits before .txt till first underscore. which means i need only output as 5678903 $ perl -le' $_ = pqp-un_1.0G_2009-02-23_17-38-09_5678903.txt ;

connecting to multiple hosts using Net::SSH2

2009-02-26 Thread monnappa appaiah
Hi all, I'm using windows machine and i'm using Net::SSH2 module to connect to remote machine below is the code i'm using, its working fine if i'm connecting to one host #!/usr/bin/perl -w use strict; use Net::SSH2; my $ssh2 = Net::SSH2-new(); $ssh2-connect(hostname) or die Unable to

Type and Size of the uploaded file

2009-02-26 Thread Gunnar Hjalmarsson
[ Please reply to the beginners list - I don't answer questions privately. ] Prasath wrote (to me privately): I am new in perl, i have to find the type and size of the uploaded file in perl. Send me the syntax to find With CGI::UploadEasy you can do: use CGI::UploadEasy; my $ue =

Re: network program for copying file from a remote machine

2009-02-26 Thread Gunnar Hjalmarsson
Anirban Adhikary wrote: Yogesh Sawant wrote: On Thu, Feb 26, 2009 at 1:47 PM, Anirban Adhikary anirban.adhik...@gmail.com wrote: I want to write a program which can copy files from remote machine ( like scp) using perl network programming.Is it possible to create such program? how about

Re: regarding hash

2009-02-26 Thread Jim Gibson
On 2/26/09 Thu Feb 26, 2009 6:24 AM, Irfan Sayed irfan_sayed2...@yahoo.com scribbled: Hi All,   I have sorted one array in ascending order. Now i want to store that sorted output (key/value pair ) in new hash. How can i do that. By design, hashes do not have an order. Key/value pairs are

Re: connecting to multiple hosts using Net::SSH2

2009-02-26 Thread Jim Gibson
On 2/26/09 Thu Feb 26, 2009 8:26 AM, monnappa appaiah monnapp...@gmail.com scribbled: Hi all, I'm using windows machine and i'm using Net::SSH2 module to connect to remote machine How can i use the same piece of code to read a list of hosts from a text file and then connect to

Re: connecting to multiple hosts using Net::SSH2

2009-02-26 Thread Rob Dixon
monnappa appaiah wrote: Hi all, I'm using windows machine and i'm using Net::SSH2 module to connect to remote machine below is the code i'm using, its working fine if i'm connecting to one host #!/usr/bin/perl -w use strict; use Net::SSH2; my $ssh2 = Net::SSH2-new();

picking largest key by value..

2009-02-26 Thread Rick
trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys %files),\n; =pod grep($max=($files{$_} $max )? $_ : $max,keys %files); =cut for my $jot (keys

Re: picking largest key by value..

2009-02-26 Thread Jim Gibson
On 2/26/09 Thu Feb 26, 2009 12:34 PM, Rick rich.j...@gmail.com scribbled: trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys %files),\n; =pod

Re: picking largest key by value..

2009-02-26 Thread Owen
On Thu, 26 Feb 2009 15:34:11 -0500 Rick rich.j...@gmail.com wrote: trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys %files),\n; =pod

Re: picking largest key by value..

2009-02-26 Thread Rick
Rick wrote: trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys %files),\n; =pod grep($max=($files{$_} $max )? $_ : $max,keys %files); =cut for my $jot

Re: picking largest key by value..

2009-02-26 Thread rich . japh
Will try that once I get back --Original Message-- From: Owen To: beginners@perl.org Subject: Re: picking largest key by value.. Sent: Feb 26, 2009 3:53 PM On Thu, 26 Feb 2009 15:34:11 -0500 Rick rich.j...@gmail.com wrote: trying out getting lasrgest key(by value) but below is not

Re: picking largest key by value..

2009-02-26 Thread Gunnar Hjalmarsson
Rick wrote: trying out getting lasrgest key(by value) snip my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; Any special reason why you say my %files = %{{ ... }}; instead of simply my %files = ( ... ); ? While this suggestion is inefficient, it

Re: picking largest key by value..

2009-02-26 Thread John W. Krahn
Rick wrote: trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys %files),\n; =pod grep($max=($files{$_} $max )? $_ : $max,keys %files); =cut for my $jot

Re: picking largest key by value..

2009-02-26 Thread Jim Gibson
On 2/26/09 Thu Feb 26, 2009 3:53 PM, John W. Krahn jwkr...@shaw.ca scribbled: Rick wrote: trying out getting lasrgest key(by value) but below is not working... help please. my %files=%{{one =1, thiry =30, four =4, never =997, forever =11, five =5}}; my $max; print join( ,keys

Re: regarding regular expression

2009-02-26 Thread John W. Krahn
Irfan Sayed wrote: Still i am not getting proper result. Here is my code. please help. $string = pqp-un_1.0G_2009-02-23_17-38-09_5678903.txt; $string = ( split /\D+/ )[ -1 ]; $string = ( split /\D+/, $string )[ -1 ]; print $string\n; John -- Those people who think they know

Re: Retrieving Cookies does not return all domain values

2009-02-26 Thread Gunnar Hjalmarsson
Thomas Hilbig wrote: I am in the process of changing my cookies (stored on my users’ browsers) so they can be shared across multiple servers under my domain. So, instead of writing cookies with domain ‘www.mydomain.com’, I am writing them to ‘.mydomain.com’ so they can be read by