Re: Floating point question

2009-01-13 Thread Rob Dixon
ANJAN PURKAYASTHA wrote: > Owen wrote: >> ANJAN PURKAYASTHA wrote: >>> >>> I would like to divide a floating point number into its whole and >>> fractional parts. >>> So, >>> ($w, $f)= some_subroutine(12.735) >>> assigns 12 to $w and 0.735 to $f. >>> >>> Any easy perlish way of doing this? >> >> S

Re: Floating point question

2009-01-13 Thread Gunnar Hjalmarsson
ANJAN PURKAYASTHA answered: ANJAN PURKAYASTHA asked: I would like to divide a floating point number into its whole and fractional parts. So, ($w, $f)= some_subroutine(12.735) assigns 12 to $w and 0.735 to $f. Any easy perlish way of doing this? after some research i was able to answer my own

Re: Floating point question

2009-01-13 Thread ANJAN PURKAYASTHA
thanks owen. after some research i was able to answer my own question. solution: use POSIX; $n= 12.735; $w= floor($n); # assigns the value 12 to $n. $f= $n-$w; # this holds the fractional value. thanks! anjan On Tue, Jan 13, 2009 at 6:13 PM, Owen wrote: > > Hi, > > I would like to divide a f

Re: Floating point question

2009-01-13 Thread Owen
> Hi, > I would like to divide a floating point number into its whole and fractional > parts. > So, > ($w, $f)= some_subroutine(12.735) > assigns 12 to $w and 0.735 to $f. > > Any easy perlish way of doing this? Someone no doubt will have a one liner, but here is a logical way of achieving the re

Floating point question

2009-01-13 Thread ANJAN PURKAYASTHA
Hi, I would like to divide a floating point number into its whole and fractional parts. So, ($w, $f)= some_subroutine(12.735) assigns 12 to $w and 0.735 to $f. Any easy perlish way of doing this? TIA, Anjan -- = anjan purkayastha, phd bioinformatics analyst whitehea

Problems with install modules with CPAN and from source code when I update my PERL

2009-01-13 Thread Armin Garcia
Hi everybody thanks for read I have a problem with CPAN, the problem is becouse I change my PERL version... Well First create in my .bashrc my perl variable export PERL_HOME=/usr/local/Perl-5.10/perl-5.10.0 export PATH=${ANT_HOME}/bin:${JAVA_HOME}/bin:${JRE_HOME}/bin:${PYTHON_HOME}/bin:${RU

Re: How Can I read a dd image WindowsXP file using perl?

2009-01-13 Thread Chas. Owens
On Tue, Jan 13, 2009 at 14:59, Armin Garcia wrote: > thanks > > > But Im know do that... > > I want > Read the dd image file using perl and with some modules (thats my question) > xtract information to do a forensic analyse... > snip The easiest way to do that would be to mount the file with a lo

Re: How Can I read a dd image WindowsXP file using perl?

2009-01-13 Thread Armin Garcia
thanks But Im know do that... I want Read the dd image file using perl and with some modules (thats my question) xtract information to do a forensic analyse... thanks On Tue, Jan 13, 2009 at 2:03 AM, Chas. Owens wrote: > On Mon, Jan 12, 2009 at 23:39, Armin Garcia wrote: > > Hi !!! > > Wel

Re: DBI and SQLite efficiency

2009-01-13 Thread Rob Dixon
Southworth, Harry wrote: > I have a database with several tables in it, and each table contains data on > lots of people. From one run of my program to the next, the tables could > change, so my code needs to be fairly general. > > I want to pull the data for each person from each table, and cre

RE: DBI and SQLite efficiency

2009-01-13 Thread Jenda Krynicky
From: "Southworth, Harry" > I think that if I append (rather than overwrite) each report with each > table, I could restructure the code like you suggest. Thanks for > pointing that out - it hadn't occurred to me. > > > my %sth; > > for (0..$#tables){ > > $sth{$tables[$_]} = $dbh->prepare( > >

RE: DBI and SQLite efficiency

2009-01-13 Thread Southworth, Harry
Thanks. I think that if I append (rather than overwrite) each report with each table, I could restructure the code like you suggest. Thanks for pointing that out - it hadn't occurred to me. > my %sth; > for (0..$#tables){ > $sth{$tables[$_]} = $dbh->prepare( >"SELECT * FROM $theTable WHER

Re: inverting List::Compare

2009-01-13 Thread Dr.Ruud
John W. Krahn wrote: my @llist = do { open my $fh, '<', $lfile or die "Unable to open '$lfile': $!"; <$fh>; }; Again, especially for biggish files, this is a better way: my @llist; { open my $fh, '<', $lfile or die "'$lfile': $!"; @llist = <$fh>; } Randall's idea

Re: Passing info to a sub function

2009-01-13 Thread Telemachus
On Mon Jan 12 2009 @ 7:56, Mr. Shawn H. Corey wrote: > On Mon, 2009-01-12 at 18:40 -0600, Harry Putnam wrote: > > I'm in the middle of some administrative type of scripting and my > > skill level is pretty low. I ran up on a need to pass two different > > kinds of chunks of into to a sub function.

Re: DBI and SQLite efficiency

2009-01-13 Thread Jenda Krynicky
From: "Southworth, Harry" > I have a database with several tables in it, and each table contains > data on lots of people. From one run of my program to the next, the > tables could change, so my code needs to be fairly general. > > I want to pull the data for each person from each table, and cr

DBI and SQLite efficiency

2009-01-13 Thread Southworth, Harry
I have a database with several tables in it, and each table contains data on lots of people. From one run of my program to the next, the tables could change, so my code needs to be fairly general. I want to pull the data for each person from each table, and create an XML report - one report for

Re: How Can I read a dd image WindowsXP file using perl?

2009-01-13 Thread Chas. Owens
On Mon, Jan 12, 2009 at 23:39, Armin Garcia wrote: > Hi !!! > Well Does anybody knows how Can I analyze a dd image of WindowsXP using > Perl? > I mean, exist some module for obtain info of this dd files? > Books? articles? URLS? > > > I hope some body help me And thans so much > You could tr