Search Results

Search: Posts Made By: irudayaraj
1,479
Posted By pamu
my @arrayline=`ssh -n $user\@$server $cmd`;above...
my @arrayline=`ssh -n $user\@$server $cmd`;above code connects to server whose user name is $user, server address is $server.
and executes command $cmd and assign the output to your variable..
1,119
Posted By msabhi
Would like to add to above :
Would like to add to above :
1,119
Posted By bartus11
It will select all the elements from @filelist...
It will select all the elements from @filelist that contain "$cutomers" and replaces @filelist with that new list.
1,024
Posted By balajesuri
Value referred by $seen{$_} is incremented, and...
Value referred by $seen{$_} is incremented, and the elements from @in that doesn't contain new $seen{$_} is picked and stored in @unique.

Read about grep in perldoc...
1,078
Posted By birei
Yes. See Regexp Quote-Like Operators in perlop. ...
Yes. See Regexp Quote-Like Operators in perlop.

The substitution command replaces first part with second part s/first_part/second_part/. The 'g' flag is to apply the substitution many times for...
13,894
Posted By rangarasan
PERL
Hi,

Just check wheather the variable have value greater than or equal to zero then its positive else negative.

if ( $max >= 0 )
{
print "Positive\n";
}
else
{
print "Negative\n";
}...
9,036
Posted By rangarasan
Pattern Match in PERL
Hi,

Try this one,


$new_dates =~ s/\s+//g;


Cheers,
Ranga:)
6,424
Posted By ahamed101
You understood the substitution right... ...
You understood the substitution right...
s/yyyy/$Y1
Replace yyyy with the value of $Y1

$_ is a inbuilt variable. So if we do any operations without specifying the variables, it will be done on...
2,653
Posted By jim mcnamara
The nine element array created by localtime, for...
The nine element array created by localtime, for example, can be concatenated or printed in any order. The date value requires + 1900 to get the year, and the month is zero-based and requires +1 to...
3,936
Posted By radoulov
Numerical and string comparisons require...
Numerical and string comparisons require different operators.

This is from perldoc perlop:
3,936
Posted By radoulov
You need: $date_var ne '' instead of: ...
You need:

$date_var ne ''

instead of:

$date_var != ''

Change all the %H in %I in order to provide valid dates to the date command.
3,936
Posted By radoulov
It should handle AM/PM correctly. Try it and let...
It should handle AM/PM correctly. Try it and let us know.
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 10:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy