Hi Abu,
This code works for me:
#!/usr/bin/perl
my $d1, $d2, $sum;
$d1 = 6.892964 * 10 ** -309;
$d2 = 1.102874 * 10 ** -307;
$sum = $d1 + $d2;
printf("d1 = %e\n", $d1);
printf("d2 = %e\n", $d2);
printf("sum = %e\n", $sum);
On Mon, Sep 20, 2010 at 1:30 PM, Abu Yoav wrote:
> Hi,
>
> I wanted
Hi,
Does anyone have some experience with the perl Encode::GSM0338 module. I
need to encode some utf8 content (predominantly french characters) I fetch
from a mysql database and then encode them to the corresponding gsm
character set. Without doing this the content is not rendered properly on
the
On 9/15/10 14:37, Mimi Cafe wrote:
I just found few cpan modules (Geo::IP2Location, Geo::IP) which both use
flat file databases to lookup country an IP is originating from, but I yet
to understand how the originating city can be determined. Any other
suggestions?
Maxmind (who makes the databas
Hi,
I wanted to port a small c program to perl. However, the two programs behave
differently with respect to very small "double" values. The behavior seems
like a bug to me, but since I'm very new to perl, I thought I might ask the
list first.
Relevant code and output follows. Thanks!
--- c code
On 2010-09-20 14:16, wrote:
while(){
Use of a File Handle in this case would be better
my ($key, $value) = split (/\t/,$_);
and Use "\s+" instead of "\t" .
And even better, use the special ' '.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands,
> while(){
Use of a File Handle in this case would be better
> my ($key, $value) = split (/\t/,$_);
and Use "\s+" instead of "\t" .
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 10-09-20 03:21 AM, Kammen van, Marco, Springer SBM NL wrote:
-Original Message-
From: rahul patil [mailto:rahul.deshmukhpa...@gmail.com]
Sent: Monday, September 20, 2010 8:59 AM
To: beginners@perl.org
Subject: What does -w means in #!/usr/bin/perl -w
Hello all,
I use linux.
whe
On Monday 20 September 2010 12:30:55 Raj wrote:
> Hi,
>
> I am a newbie for perl.
>
> It would be fine if some explain how the following code prints first
> 10 lines of the file.
> My question here is, how/what if condition match happens? Is there
> anything related to current record number ($.
Hi,
I am a newbie for perl.
It would be fine if some explain how the following code prints first
10 lines of the file.
My question here is, how/what if condition match happens? Is there
anything related to current record number ($.) variable?
while () {
print if 1 .. 10;
}
Regards,
Raj
Hi Jordi,
On Monday 20 September 2010 10:16:40 Jordi Durban wrote:
> Hi all!
> I have a file like this :
>
> colum acolum b
> uid = 1 uid = 4
> uid = 2 uid = 3
> uid = 3 uid = 2
> uid = 4 uid = 1
>
> I'm trying to find those columns with the same numbers
On Monday 20 September 2010 09:49:27 rahul patil wrote:
> Hello all,
>
> below is sample code i have written.Is it right way to declare ar4 which is
> concatenation of ar and ar1
>
> #!/usr/bin/perl
> @ar = {"rahul","patil"};
You shouldn't use { ... } for arrays (this is not C). Use:
my @ar = (
> "PK" == Parag Kalra writes:
PK> #!/usr/bin/perl
PK> use strict;
PK> use warnings;
PK> my @ar = ("rahul","patil");
PK> my @ar1 = ("nitin");
PK> my @ar4;
PK> push @ar4, (@ar, @ar1);
PK> print "@ar4";
it is nice that you are trying to help but your code can be
better. there is
Hi all!
I have a file like this :
colum acolum b
uid = 1 uid = 4
uid = 2 uid = 3
uid = 3 uid = 2
uid = 4 uid = 1
I'm trying to find those columns with the same numbers regardless the colum
they are. That's, in the example, the row 2 is identital to row 3.
On Mon, Sep 20, 2010 at 1:30 PM, Chaitanya Yanamadala <
dr.virus.in...@gmail.com> wrote:
> @ar = ("rahul","patil");
> @ar1 = ("nitin");
> @ar4 = (@ar,@ar1);
>
> the only problem is u should not define the array with this { } it should
> be defined within this brackets ();
>
> Chaitanya
>
>
This wo
@ar = ("rahul","patil");
@ar1 = ("nitin");
@ar4 = (@ar,@ar1);
the only problem is u should not define the array with this { } it should be
defined within this brackets ();
Chaitanya
On Mon, Sep 20, 2010 at 1:19 PM, rahul patil
wrote:
> Hello all,
>
> below is sample code i have written.Is it
#!/usr/bin/perl
use strict;
use warnings;
my @ar = ("rahul","patil");
my @ar1 = ("nitin");
my @ar4;
push @ar4, (@ar, @ar1);
print "@ar4";
Cheers,
Parag
On Mon, Sep 20, 2010 at 12:49 AM, rahul patil
wrote:
> Hello all,
>
> below is sample code i have written.Is it right way to declare ar4 whi
Hello all,
below is sample code i have written.Is it right way to declare ar4 which is
concatenation of ar and ar1
#!/usr/bin/perl
@ar = {"rahul","patil"};
@ar1 = {"nitin"};
@ar4 = {...@ar,@ar1};
print @ar4[2];
if yes, why it is not printing output as nitin on my system
--
Regards,
Rahul Patil
>-Original Message-
>From: rahul patil [mailto:rahul.deshmukhpa...@gmail.com]
>Sent: Monday, September 20, 2010 8:59 AM
>To: beginners@perl.org
>Subject: What does -w means in #!/usr/bin/perl -w
>Hello all,
>I use linux.
>whenever we write a perl script we use
>#!/usr/bin/perl -w
>at th
18 matches
Mail list logo