Search Results

Search: Posts Made By: ganapati
1,621
Posted By ganapati
great help, thank you very much for useful...
great help, thank you very much for useful information.:b:
1,621
Posted By ganapati
Thank you for the answer. But I need to convert...
Thank you for the answer.
But I need to convert the numbers inside the perl script using constants and not on command prompt.
How can I assign the converted values to the constant '$num' as per my...
1,621
Posted By ganapati
Simple perl help - converting numbers
Hi friends,

I'm very new to perl and got some requirement.
I've input numbers which has size of 17 characters [including +/- sign and .] like below:

-22500.0000000000
58750.00000000000...
17,861
Posted By ganapati
It worked, Thanks.
Thanks a lot Pludi :b:
Your solution worked.

The requirement was in perl, but I know only little on perl and bit familiar in shell when compared to perl. Hence I've mixed it up according to my...
17,861
Posted By ganapati
my @selected_rundates = system ("ls -1 $RWOUTPUT...
my @selected_rundates = system ("ls -1 $RWOUTPUT | sed -n \"\/'$report_start_date'\/,\/'$report_end_date'\/p\"");

or

my @selected_rundates = system ("ls -1 $RWOUTPUT | sed -n...
17,861
Posted By ganapati
PERL script -- calling 'sed' by passing 'variable value'.
Hi Friends,

I'm calling 'sed' command inside one perl script, which is to list directory names which are having some date value as their names (in the form YYYYMMDD) with in the range (start and...
4,616
Posted By ganapati
Link needed to the perl package "Math::Round"!!
I've got it from internet and installed Round.pm module under 'lib\perl5\5.10\Math' and its working now :) Thanks.
4,616
Posted By ganapati
Thanks for your valuable suggestion "fpmurphy"...
Thanks for your valuable suggestion "fpmurphy" :)
4,616
Posted By ganapati
Another question arises here: If I use...
Another question arises here:

If I use floor(), as:

#!/usr/bin/perl
use POSIX;
foreach my $i ( 0.4, 0.5, 1.2, 1.6, 2.1, 2.9) {
printf "$i -> %.0f\n", floor($i);
}
__END__

resulting...
4,616
Posted By ganapati
Hi Pludi, Thanks a lot for your torch light...
Hi Pludi,

Thanks a lot for your torch light and solution.

Cheers ~~ / Mysore 101 Ganapati.
4,616
Posted By ganapati
PERL - rounding fractional number
It seems that perl sprintf uses the round-to-even method:

foreach my $i ( 0.5, 1.5, 2.5, 3.5 ) {
printf "$i -> %.0f\n", $i;
}
__END__

0.5 -> 0
1.5 -> 2
2.5 -> 2
3.5 -> 4
4.5 -> 4
...
4,431
Posted By ganapati
Hi All Thanks a lot for all your suggestions...
Hi All

Thanks a lot for all your suggestions and I have implemented 'summer cherry's logic.
Also, I tried to understand his logic, but not able to do so.

Could any one explain the below logic....
4,431
Posted By ganapati
Perl script to sort data on second numeric field
Hi,

I'm a learner of PERL programming.

I've a input file with the below data:

SWAT_5, 1703, 2010-09-21
SWAT_6, 2345, 2010-09-21
SWAT_7, 1792, 2010-09-21
SWAT_8, 1662, 2010-09-21...
12,045
Posted By ganapati
Exactly worked as I wanted. Thanks a lot,...
Exactly worked as I wanted.

Thanks a lot, Pludi.:b:
12,045
Posted By ganapati
PERL- converting exponent value to floating point
Hi Friends,

I've an exponent value like,

$val="9.57669e-05";

I want to convert this value to floating point value in PERL scripting.
I tried googling for the solution, and also asked many...
7,778
Posted By ganapati
Thanks for your approach 'bigearsbilly'. But...
Thanks for your approach 'bigearsbilly'.

But are there any otherway, than the aphanumeric comparision for the date field? I'm very curious to know more?
7,778
Posted By ganapati
Thanks for your quick reply ahmad diab. :) ...
Thanks for your quick reply ahmad diab. :)

But, files selecting start and end dates are commandline parameters to the programme.

my $startdate = $ARGV[0];
my $enddate = $ARGV[1];

my...
7,778
Posted By ganapati
PERL - Selecting specific files based on 'date stamp' values
Hi,

I've list of files in a directory, which have date stamp value in their names.

ex:
abc_data_20071102.csv,
abc_data_20091221.csv,
abc_data_20100110.csv,
abc_data_20100222.csv, ...
3,614
Posted By ganapati
Perl - need some more help.
Thanks for your solutions to 'summer cherry' and 'kcoder24'.

I've already implemented "abubacker's" solution. Now, Added the feature to his code, is it possible to handle multiple input files with...
3,614
Posted By ganapati
Wareh wahh!!! I'm thrilled :) Tons of thanks to...
Wareh wahh!!! I'm thrilled :)
Tons of thanks to abubacker, it works exactly as expected. :b:

Added the feature to this code, is it possible to handle multiple input files with different dates as...
3,614
Posted By ganapati
Thanks for the reply to all, and for the provided...
Thanks for the reply to all, and for the provided different solutions.

I tried abubacker's solution and got the below result with warning messages and one unwanted additional line, as below:
...
3,614
Posted By ganapati
Summing column value - using PERL
I'm new to perl programming. I've a csv file as below.

20100221, abc_1, 200
20100221, abc_4, 350
20100221, opq_3, 200
20100221, abc_5, 220
20100221, xyz_1, 500
20100221, abc_2, 500
20100221,...
3,218
Posted By ganapati
I think 'sleep (60);' is to allow other perl...
I think 'sleep (60);' is to allow other perl scripts to write the same file, which is already opened by some other script. That should work fine, I believe.
2,053
Posted By ganapati
Hi Vgersh99, Thanks for opening my eyes, ...
Hi Vgersh99,

Thanks for opening my eyes,
Thanks for blowing your torch,
Thanks for your time and help,
Thanks for your working answer.
:b:
Cheers~~/ Mysore 101 Ganapati.
A sound discretion...
2,053
Posted By ganapati
Text Alignment Problem
Dear Friends,

I've one file "sample.log" with the below comma separated lines:

BOND_FORWARD,0 succeeded,0 failed.
EQUITY_FORWARD,0 succeeded,0 failed.
FRA,12 succeeded,0 failed....
Showing results 1 to 25 of 147

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