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 everyt
On 2/26/09 Thu Feb 26, 2009 3:53 PM, "John W. Krahn"
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"}};
>>
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 )? $_ : $
Rick wrote:
trying out getting lasrgest key(by value)
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 sugge
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 wrote:
> trying out getting lasrgest key(by value) but below is not working...
>
> help ple
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 )? $_ : $
On Thu, 26 Feb 2009 15:34:11 -0500
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),"
On 2/26/09 Thu Feb 26, 2009 12:34 PM, "Rick"
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(" ",key
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 %fil
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::S
On 2/26/09 Thu Feb 26, 2009 8:26 AM, "monnappa appaiah"
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 all the hos
On 2/26/09 Thu Feb 26, 2009 6:24 AM, "Irfan Sayed"
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 stored randomly
in th
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 us
[ 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 = CGI:
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 "Unabl
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 ";
p
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.
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.
Thank you for your reply. Yes, I was also thinking that, thanks.
-L
2009/2/26 Yogesh Sawant :
>
> On Wed, Feb 25, 2009 at 6:14 PM, Lauri Nikkinen
> wrote:
>>
>> Hi,
>>
>> I wrote a script which copies files in directory to an another
>> directory based on user input. Any suggestions to simplify
I am not able to use any module .
On Thu, Feb 26, 2009 at 2:05 PM, Yogesh Sawant 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 remote machine
On Wed, Feb 25, 2009 at 6:14 PM, Lauri Nikkinen wrote:
> 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 using command line
a
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 -
http
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.
23 matches
Mail list logo