> > In the "quick and dirty" category, you can do something like this:
> >
> > (I'm trying to remember off the top of my head)
> >
> > ##
> >
> > my $result = ArrayCmp(\@array1,\@array2);
> > #pass two array references
> >
> > sub ArrayCmp{
> > my($ref1,$r
On Mon, 2002-07-22 at 14:41, Desmond Lee wrote:
> Hi guys
>
> I'm trying to read a file, but it's just one massive line. I think that the
> ^M is suppose to be an indication that that's wehre teh newline is suppose
> to be. I've tried to replace ^M with a newline by executing something that i
From: Wiggins d'Anconia <[EMAIL PROTECTED]>
>
> >
> > Could you ask them if they would install (or have already installed)
> > DBI and DBD::CSV or DBD::File? You could then convert your database
> > to flat files or CSVs on your side (by a Perl script that would just
> > connect the Access via D
> -Original Message-
> From: Merritt Krakowitzer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 4:19 AM
> To: Bob Showalter; 'Timothy Johnson'; 'Beginners '
> Subject: RE: Comparing Arrays
>
> > I just found out I can shorten my one-liner to:
> >
> >@foo==@bar && "@{{map
On Tuesday, July 23, 2002, at 03:43 , kent ho wrote:
> Please help. I want to expand the "date" command in the echo command:
>
> Ex:
>
> $log="/tmp/ito.log"
> `echo Warning: some text > $log`
>
> I need to expand the "date" command somewhere in this echo command, please
> show me how.
why go ou
Hello:
I have an account on linux box but I am not root.
I would like to install some module like Bioperl in my own directory
using CPAN.
Is it possible to do this. if so, what do I configure to install in my
own directory or what is command?
Please help me with CPAN.
I tried the documents abo
I 've just downloaded a "Imager" module, however, that's a .tar.gz file
and I am using Win Me. After I extract the file, there are quite sort of
files and dirs. So... how can I install it to my Perl lib or site/lib ?
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
In normal case, when we want to swap 2 var,
, say $x and $y, we do in this way :
$z = $x; $x = $y; $y = $z; # Swapped
today, I suddenly found a code like this :
$x ^= $y ; $y ^= $x ; $x ^= $y; # Swapped
It works !! but how that works ?
Could anybody tell me ?
Rgds,
Connie
--
To unsubscr
please forgive this su*perl*flu*ous question.
This board is a great resource to try, ask, study and learn. Does anyone here
know if there is such a board (a 'high' volume, daily archive, not just
google groups/usenet) for the C Language and 'new' users in particular.
I know, depending on who
Hello All,
I want to execute same perl procedure with different parameters at
the almost same time in a perl program indefendantly. (next process
should be started without waiting for the end of previous one) The
procedure is located in .pm file. How can I use thread in perl to get
my work d
Hello all,
I am using add_delta_workdays() from Date::Calendar to determine whether
yesterday was or was not a business day. In order to do this, I am
trying to compare it with a date output from Add_Delta_Days from
Date::Calc.
What I'd *like* to do is stringify the output from both of these
fu
On Jul 25, Connie Chan said:
>In normal case, when we want to swap 2 var,
>, say $x and $y, we do in this way :
>
>$z = $x; $x = $y; $y = $z; # Swapped
Perl allows you to do
($x, $y) = ($y, $x);
>$x ^= $y ; $y ^= $x ; $x ^= $y; # Swapped
>
>It works !! but how that works ?
Because of the w
perldoc thread
This turned up a library on how to thread processes in perl.
Seemed fairly straightforward. (though it did say it was
experimental, so there may be a better module out there?)
-Tony
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
> -Original Message-
> From: Connie Chan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 12:08 PM
> To: [EMAIL PROTECTED]
> Subject: That seems interesting ? but I don't know why ?
>
>
> In normal case, when we want to swap 2 var,
> , say $x and $y, we do in this way :
>
>
If you're using activestate perl on your windows box, just use ppm.
Just type ppm to enter the package manager, then
install package:name
and it does the work for you.
-Tony
-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 11:04 AM
To: [E
hi david:
try cprogramming.com.
regards,
francis
david wrote:
> please forgive this su*perl*flu*ous question.
>
> This board is a great resource to try, ask, study and learn. Does anyone here
> know if there is such a board (a 'high' volume, daily archive, not just
> google groups/usenet) for
Hello all,
I am using add_delta_workdays() from Date::Calendar to determine whether
yesterday was or was not a business day. In order to do this, I am
trying to compare it with a date output from Add_Delta_Days from
Date::Calc.
What I'd *like* to do is stringify the output from both of these
fu
yep, [EMAIL PROTECTED]
just got to yahoo and yahoo groups and sign up for it. C is very much alive
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 1:53 AM
> To: [EMAIL PROTECTED]
> Subject: C Beginners List? question, sorry,...
>
>
> please
Thanks a lot =) but this method don't work for me...
because the cpan server ( I guess ) don't carry this module..
so, both ppm and ppm3 not work. So have to download it by
myself, but ... dunno how to install. Any else further advise ?
Rgds,
Connie
- Original Message -
From: "Akens,
Warning: lots of 0 and 1 ahead. Typos are lurking...
On Thu, Jul 25, 2002 at 12:08:09AM +0800, Connie Chan wrote:
> In normal case, when we want to swap 2 var,
> , say $x and $y, we do in this way :
>
> $z = $x; $x = $y; $y = $z; # Swapped
>
> today, I suddenly found a code like this :
>
On Wednesday, July 24, 2002, at 09:05 , Ian Zapczynski wrote:
[..]
> What I'd *like* to do is stringify the output from both of these
> functions, as they both return objects. Is this possible? If I do
> something like:
>
> ($year,$month,$day) = Today();
> $yesterday = Add_Delta_Days($year,$mo
> Content-type: application/octet-stream
> Content-Disposition: attachment\; filename=$file
This seems IE way, if I don't remember it wrongly,
this does not work at NS
Anyway, how about this ?
$| = 1;
my $file = 'yourfile.ext';
print "Content-type: application/(your file type)\r\n\r\n";
Hello all,
My hash keys look something like this:
>1234 x5
So I am thinking a cmp, as opposed to <=> is best.
What I want is for the keys to be sorted as follows:
>1 x
>2 x
>3 x
..
..
..
>n x
This is what I have in my script at the moment:
my @sort_this = keys %final_list;
m
If you want ascending numeric then <=> vs cmp ( ascii ) and you have
it.
Wags ;)
-Original Message-
From: nkuipers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 10:39
To: [EMAIL PROTECTED]
Subject: another sort question (flame away)
Hello all,
My hash keys look som
not a dumb question... I actually have the same problem.
I have version numbers that look like this:
V1.2.3
V1.2.20
V1.2.23
and it sorts it wrong with cmp and <=>
soo.. I had to come up with my own sort subroutine
here is very generic one that breaks up the elements by \w (word types
[a-Z0-9]
> -Original Message-
> From: nkuipers [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 1:39 PM
> To: [EMAIL PROTECTED]
> Subject: another sort question (flame away)
>
>
> Hello all,
>
> My hash keys look something like this:
>
> >1234 x5
>
> So I am thinking a cmp, as oppos
Nikola Janceski wrote at Wed, 24 Jul 2002 19:45:54 +0200:
> not a dumb question... I actually have the same problem. I have version numbers that
>look like
> this:
>
> V1.2.3
> V1.2.20
> V1.2.23
>
> and it sorts it wrong with cmp and <=>
>
> soo.. I had to come up with my own sort subroutine
rohana wrote at Wed, 24 Jul 2002 08:57:17 +0200:
> I want to execute same perl procedure with different parameters at the almost same
>time in a perl
> program indefendantly. (next process should be started without waiting for the end
>of previous
> one) The procedure is located in .pm file. H
yeah.. but that's not all I use it for
=P
> -Original Message-
> From: Janek Schleicher [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 1:22 PM
> To: [EMAIL PROTECTED]
> Subject: RE: another sort question (flame away)
>
>
> Nikola Janceski wrote at Wed, 24 Jul 2002 19:45:54
Bob wrote:
<=> should probably still work, because when evaluating a string
as a number, Perl will evaluate up to the first character that
doesn't look like part of a number. so "1234 x5" evalutates as
the number 1234 (stops at the space char).
*
I didn't know that. What I did after reading
>Would trapping it an eval be what the doctor ordered?
To answer my own question, no, it would not.
#use warnings;
would be better.
=D
Hope y'all got a good chuckle out of it anyway.
"I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich."
--
To unsubscribe, e-mail: [
>From: nkuipers [mailto:[EMAIL PROTECTED]]
>
>>Would trapping it an eval be what the doctor ordered?
>
>To answer my own question, no, it would not.
>
>#use warnings;
>
>would be better.
It would probably be best to use
no warnings;
before the sort line in your script and
use warnings;
on the f
> -Original Message-
> From: nkuipers [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: another sort question (flame away)
>
>
> >Would trapping it an eval be what the doctor ordered?
>
> To answer my own question, no, it would no
or just use my subroutine =P
> -Original Message-
> From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 3:11 PM
> To: 'nkuipers'; [EMAIL PROTECTED]
> Subject: RE: another sort question (flame away)
>
>
> > -Original Message-
> > From: nkuipers [mailto
On Wed, 2002-07-24 at 02:57, [EMAIL PROTECTED] wrote:
> Hello All,
>
> I want to execute same perl procedure with different parameters at
> the almost same time in a perl program indefendantly. (next process
> should be started without waiting for the end of previous one) The
> procedure is l
It is possible to change vars in the main script with fork if you use
IPC::Shareable
But be forewarned it's gets pretty cumbersome when you have 2+ processes
sharing vars.
> -Original Message-
> From: Chas Owens [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 3:29 PM
> To: [EM
I read (ok, skimmed...) the results from perldoc -m cwd. I don't
understand cwd (current working directory). My questions apply to this
general scenario:
In practice, I'd like to work with my .pl or .plx files in say, /myhome/bin/
Suppose I want to do some looping on some files in /data/path
Do you have a C compiler?
-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 9:40 AM
To: [EMAIL PROTECTED]
Subject: Re: PM installation problem
Thanks a lot =) but this method don't work for me...
because the cpan server ( I guess ) don't car
Bob Showalter wrote:
>
> Well, it only works for integers. It's because of the way ^
> (bitwise xor) works. Given x=0 and y=1, for instance:
>
>x = x ^ yy = y ^ x x = x ^ y
>x = 0 ^ 1y = 1 ^ 1 x = 1 ^ 0
>x = 1y = 0 x = 1
Actually in perl it works with strin
Nkuipers wrote:
>
> Hello all,
Hello,
> My hash keys look something like this:
>
> >1234 x5
>
> So I am thinking a cmp, as opposed to <=> is best.
>
> What I want is for the keys to be sorted as follows:
>
> >1 x
> >2 x
> >3 x
> ..
> ..
> ..
> >n x
>
> This is what I have i
This should not matter what the size is but would expect a number at
the beginning:
foreach my $MyKey (sort {$a->[1] <=> $b->[1]}
map{[ $_, /^(\d+)/ ]}
keys %final_list) {
printf "%-s\n", $MyKey->[0];
}
Wags ;)
-Original Message-
From: Jo
On Wed, 24 Jul 2002, McCormick, Rob E wrote:
>
> I read (ok, skimmed...) the results from perldoc -m cwd. I don't
> understand cwd (current working directory). My questions apply to this
> general scenario:
>
> In practice, I'd like to work with my .pl or .plx files in say, /myhome/bin/
>
>
I want to delete files.
I am not able to delete , what is the wrong thing I am doing here.
I am able to see the file in @privates
I am getting following output:
0 deleted
Attempting to delete M:\jav_test\train\k k k.mkelem.mkelem
#!c:\perl\bin\perl
@privates =`cleartool lsprivate -ta
43 matches
Mail list logo