Réf. : Re: Running Perl script as Service on win2k

2002-06-04 Thread G . LE-HUU-HOA
Another way to skip the DOS command prompt is to interprete your Perl script using wperl.exe instead of perl.exe. - Gilbert LE HUU HOA - Focal Systems Paris Sumit_Babu@i2

Re: Running Perl script as Service on win2k

2002-06-04 Thread Sumit_Babu
Hello Rajeev, If you just want to hide the DOS console then you can use the following at the beginning of the script to hide it: use Win32::GUI; BEGIN {Win32::GUI::Hide(scalar(Win32::GUI::GetPerlWindow()))}; OR If you want to run the script as a Windows service t

Running Perl script as Service on win2k

2002-06-04 Thread Rajeev Rumale
Hi, I have a perl script which runs as server/demon and needs to be runing always. currently I am starting the script using a batch file. But doing this it pops up a window. and if some user closes the window the script stops. Also the pop up window is bit annoying and it makes no sense for

Re: From tutorial

2002-06-04 Thread Geoffrey F. Green
On 6/4/02 10:26 PM, "Adam Vardy" <[EMAIL PROTECTED]> wrote: > Can someone help please. I'm learning from scratch. What is this? > > $_='My email address is <[EMAIL PROTECTED]>.'; Sets the magical Perl variable $_ to equal the scalar value: My email address is <[EMAIL PROTECTED]> > /(<.*

Re: From tutorial

2002-06-04 Thread David T-G
Adam -- ...and then Adam Vardy said... % % Can someone help please. I'm learning from scratch. What is this? I can try... % % $_='My email address is <[EMAIL PROTECTED]>.'; This is an assignment statement (see, there is another command!). It sets the $_ variable, which is the standard "w

Re: Warning Elephant Stompage

2002-06-04 Thread David T-G
drieux, et al -- I promise that I can keep this on topic, folks... ...and then drieux said... % % On Tuesday, June 4, 2002, at 04:58 , David T-G wrote: % % volks, % % the reason that the grass is moving around, is % not that there is an earthquake, merely that the elephants % are dancing the

From tutorial

2002-06-04 Thread Adam Vardy
Can someone help please. I'm learning from scratch. What is this? $_='My email address is <[EMAIL PROTECTED]>.'; /(<.*>)/i; print "Found it ! $1\n"; I can only identify one command here. Print. How does this 'program' run? -- Adam V. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Warning Elephant Stompage on Re: Parsing a path environment...

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 04:58 , David T-G wrote: volks, the reason that the grass is moving around, is not that there is an earthquake, merely that the elephants are dancing the polka here - nothing serious [..] > % the fine person wanted something more on the order of > % > % my

Re: shell script ---> perl

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 04:44 , David T-G wrote: > % or am I missing something in the voodoo > > I hope so, because if you aren't then I am :-) I like SO SUCK[1].. my $PING1='SPAGO'; print "And it is now $PING1 \n"; my $word = " fred 12 spot 345 67 bax 89%

Re: talking to mysql

2002-06-04 Thread David T-G
Hi, all -- ...and then David T-G said... % ... % I have perl, the camel book, and a keyboard :-) I'll surf around on % CPAN, but can anyone point me to some good places to look to learn about % this sort of thing? Thanks for the many and varied suggestions, and I'm sorry I wasn't more clear.

Re: Parsing a path environment...

2002-06-04 Thread David T-G
drieux, et al -- ...and then drieux said... % % On Tuesday, June 4, 2002, at 03:17 , David T-G wrote: % [..] % > % >You should be able to split on colons... % > % > [zero] [5:16pm] ~> perl -e 'foreach $p \ % >(split (/:/,$ENV{PATH})){print "$p\n"}' % % first off my complements on the skan

Re: shell script ---> perl

2002-06-04 Thread David T-G
drieux, et al -- ...and then drieux said... % % On Tuesday, June 4, 2002, at 02:38 , John W. Krahn wrote: % [..] ... % >>( $PING1 = $_ ) =~ s/\D+//g; % > % >Sorry, missed a step. :-) % > % > ( $PING1 = (split)[6] ) =~ s/\D+//g; ... % but notice that your first one squeez

Re: Parsing a path environment...

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 03:17 , David T-G wrote: [..] > > You should be able to split on colons... > > [zero] [5:16pm] ~> perl -e 'foreach $p \ > (split (/:/,$ENV{PATH})){print "$p\n"}' first off my complements on the skank - although you know and I know the fine person wanted someth

Re: talking to mysql

2002-06-04 Thread Robert Thompson
I use this online reference to double check my SQL syntax (no pun intended) and data types: http://www.mysql.com/documentation/mysql/bychapter/manual_toc.html Especially: "6 MySQL Language Reference" AFA perl, use DBI. =-= Robert Thompson On Tue, Jun 04, 2002 at 05:26:24PM -0500, David T-G

Re: shell script ---> perl

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 02:38 , John W. Krahn wrote: [..] >> #!/usr/bin/perl >> @SERVERS = qw(itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway); >> for $S ( @SERVERS ) { >> for ( `/etc/ping $S 32 -n 6` ) { >> if ( /trans/ ) { >> ( $PING1 = $_ ) =~ s/\D+//g; > > S

talking to mysql

2002-06-04 Thread David T-G
Hi, all -- I figure it's time I buckle down and try to crank out some code, and so putting my MP3 collection data into a mysql database seems a worthy challenge. I'll need to do some database stuff like come up with a structure and some relations and then put the data in and get it out. I have

Re: Parsing a path environment...

2002-06-04 Thread David T-G
James -- ...and then James Kelty said... % % Hello. Hello! % % I am writing a quick script in order to parse a users $PATH variable, but I % hit upon a quandry. % % The PATH environment is one long string with element separated by a ":", no % mystery there, but % how would I look at each in

Re: rsh/telnet/rlogin

2002-06-04 Thread David T-G
Pat -- ...and then [EMAIL PROTECTED] said... % % Hello: % Anyone know how to remotely connect using Perl? % I am quite used to using unix commands like rsh and rlogin, just % wondering how I might 'simply' do this in Perl. Almost certainly the Net::Telnet module is what you want. % % - Pat %

Re: rsh/telnet/rlogin

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 02:55 , <[EMAIL PROTECTED]> wrote: > Hello: > Anyone know how to remotely connect using Perl? > I am quite used to using unix commands like rsh and rlogin, just > wondering how I might 'simply' do this in Perl. perldoc Net::Telnet remember that 'rlogin/rsh' are ugl

Parsing a path environment...

2002-06-04 Thread James Kelty
Hello. I am writing a quick script in order to parse a users $PATH variable, but I hit upon a quandry. The PATH environment is one long string with element separated by a ":", no mystery there, but how would I look at each individual element? Normally I would use split on a line by line basis, b

rsh/telnet/rlogin

2002-06-04 Thread Patrick.Griffin
Hello: Anyone know how to remotely connect using Perl? I am quite used to using unix commands like rsh and rlogin, just wondering how I might 'simply' do this in Perl. - Pat -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: shell script ---> perl

2002-06-04 Thread John W. Krahn
"John W. Krahn" wrote: > > [EMAIL PROTECTED] wrote: > > > > ive got a simple sh script that pings machines on my network segment. > > > > very new to perl, could folx on the list give me some hints/pointers to how > > to make this shell > > script into a perl one? > > > > !/usr/bin/sh > > SERVERS

Re: shell script ---> perl

2002-06-04 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > ive got a simple sh script that pings machines on my network segment. > > very new to perl, could folx on the list give me some hints/pointers to how > to make this shell > script into a perl one? > > !/usr/bin/sh > SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 m

Re: shell script ---> perl

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 01:01 , <[EMAIL PROTECTED]> wrote: [..] > !/usr/bin/sh > SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway" > for S in $SERVERS > do > PING1=`/etc/ping $S 32 -n 6 | grep trans | awk '{print $7}' | cut > -d"%" -f1` > if [ $PING1 -gt 25 ]; t

shell script ---> perl

2002-06-04 Thread ppriest
ive got a simple sh script that pings machines on my network segment. very new to perl, could folx on the list give me some hints/pointers to how to make this shell script into a perl one? !/usr/bin/sh SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway" for S in $SERVERS do

RE: Passing array to subroutine problem

2002-06-04 Thread Bob Showalter
> -Original Message- > From: Robert Thompson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 3:38 PM > To: [EMAIL PROTECTED] > Subject: Passing array to subroutine problem > > > Hello, > > I have a subroutine where I want to pass some > paramaters to it, but assign defa

Passing array to subroutine problem

2002-06-04 Thread Robert Thompson
Hello, I have a subroutine where I want to pass some paramaters to it, but assign default ones if a paramater is not passed. This is similar to CGI. &mySub( -param1=>'my value', -param3=>'value' ); # -param2 would get a default value The problem I am running into is if

RE: Escaping characters

2002-06-04 Thread Barry Jones
Thanks. It turns out that wasn't my problem at all. I had a \n character midway through and I didn't know about /gs for those characters. It was the data, not the code. -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 2:54 PM To: Barry Jone

RE: printing key codes

2002-06-04 Thread Bob Showalter
> -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 2:51 PM > To: perl beginners > Cc: Bob Showalter > Subject: Re: printing key codes > > ... > > % > % Then you can just refer to F1 as K_F1, etc. > > Hmmm... Any codes for shifted, controlle

RE: Escaping characters

2002-06-04 Thread Bob Showalter
> -Original Message- > From: Barry Jones [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 1:15 PM > To: Beginners @ Perl (E-mail) > Subject: Escaping characters > > > Hi, > I'm trying to do a patter match for everything contained within > {{ stuff }}. Now I've gotten th

Re: printing key codes

2002-06-04 Thread David T-G
Bob, et al -- ...and then Bob Showalter said... % % > -Original Message- % > From: David T-G [mailto:[EMAIL PROTECTED]] ... % > % > Is there a simple way to get perl to spit out one line per incoming % > keycode? That is, get it to spit out % > % > 27, 79, 80 % > 27, 91, 50, 51, 1

RE: printing key codes

2002-06-04 Thread Bob Showalter
> -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 1:04 PM > To: perl beginners > Cc: Bob Showalter > Subject: Re: printing key codes > > > Bob, et al -- > > ...and then Bob Showalter said... > % > % > -Original Message- > % > From:

Re: split

2002-06-04 Thread John W. Krahn
Stefan Haberer wrote: > > hi guys, > I would like to split a line like that > > # FRI MAY 02 > > in two parts: > > $bash = # > $rest = FRI MAY > > in my version ($bash, $rest) = split(/\s/, $line); > > $rest only contains "FRI" because the line is splitted at every blank. how can

RE: Read a file into a Hash

2002-06-04 Thread Janek Schleicher
Ned Cunningham wrote at Tue, 04 Jun 2002 20:16:46 +0200: > It's a pipe delimited txt file. > Examples always help us. I assume your file looks like key1|value1 key2|value2 ... keyn|valuen Then you should try: open FILE, "<$filename" or die "Can't open $filename: $!"; my %hash = map {chomp; sp

RE: Read a file into a Hash

2002-06-04 Thread Daniel Kelley
hi- just did some work w/ a pipe-delimited file: assuming that you've already cleaned the data to make sure that there are no random pipes in there, something like the following should work: open(NEW, "$cwd/txt/new.txt") or die "couldn't open new.txt"; while ($line = ) { chomp($line);

RE: Read a file into a Hash

2002-06-04 Thread Ned Cunningham
It's a pipe delimited txt file. -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 2:15 PM To: '[EMAIL PROTECTED]' Subject:RE: Read a file into a Hash

RE: Read a file into a Hash

2002-06-04 Thread Kipp, James
how is the file laid out? -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 2:02 PM To: '[EMAIL PROTECTED]' Subject: Read a file into a Hash I am trying to traverse a file and match the key to a key in a second file... How do I put the file

Read a file into a Hash

2002-06-04 Thread Ned Cunningham
I am trying to traverse a file and match the key to a key in a second file... How do I put the file into the Hash??? %hash = "c:/file.txt"; I cant seem to find the magic here.. TIA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Escaping characters

2002-06-04 Thread Felix Geerinckx
on Tue, 04 Jun 2002 17:14:54 GMT, Barry Jones wrote: > Hi, > I'm trying to do a patter match for everything contained within > {{ stuff }}. Now I've gotten this to work just fine with ** stuff **, > ^^ and a several others, but I can't get curly braces to work and I have > no idea why. I'v

RE: avoiding 2nd process

2002-06-04 Thread HENRY,MARK (HP-Roseville,ex1)
Bob, Many thanks - I'll look into it. Mark > -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 9:22 AM > To: 'HENRY,MARK (HP-Roseville,ex1)'; '[EMAIL PROTECTED]' > Subject: RE: avoiding 2nd process > > > > -Original Message- > >

Re: perl newbie

2002-06-04 Thread Tim Musson
Hey ppriest, My MUA believes you used Internet Mail Service (5.5.2653.19) to write the following on Tuesday, June 4, 2002 at 1:38:41 PM. pic> Unix Sys administrator, versed in most shells, ksh, bourne, bash pic> etc. pic> What is the best way for me to lean perl? Learning Perl, 3rd Edition fro

Re: perl newbie

2002-06-04 Thread David T-G
Phil -- ...and then [EMAIL PROTECTED] said... % % Unix Sys administrator, versed in most shells, ksh, bourne, bash etc. Sounds familiar... % % What is the best way for me to lean perl? Up against a sturdy wall, preferably at an angle of 45 to 65 degrees. Meanwhile, go and get the camel boo

Re: perl newbie

2002-06-04 Thread Hal Wigoda
Cut off the fat. > > Unix Sys administrator, versed in most shells, ksh, bourne, bash etc. > > What is the best way for me to lean perl? > > Phil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

perl newbie

2002-06-04 Thread ppriest
Unix Sys administrator, versed in most shells, ksh, bourne, bash etc. What is the best way for me to lean perl? Phil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: printing key codes

2002-06-04 Thread David T-G
Jeff -- ...and then Jeff 'japhy' Pinyan said... % % On Jun 4, David T-G said: % % >%perl -lpe '$_ = join ", ", unpack("c*", $_)' % > % >Is there a simple way to get perl to spit out one line per incoming ... % >when it sees F1 followed by Shf-F1 without a newline between them? % % You run

Re: printing key codes

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, David T-G said: >Bob, et al -- >% >%perl -lpe '$_ = join ", ", unpack("c*", $_)' > >Is there a simple way to get perl to spit out one line per incoming >keycode? That is, get it to spit out > > 27, 79, 80 > 27, 91, 50, 51, 126 > >when it sees F1 followed by Shf-F1 without a newl

Escaping characters

2002-06-04 Thread Barry Jones
Hi, I'm trying to do a patter match for everything contained within {{ stuff }}. Now I've gotten this to work just fine with ** stuff **, ^^ and a several others, but I can't get curly braces to work and I have no idea why. I've tried escaping them with \ and not doing and what have you

Re: printing key codes

2002-06-04 Thread David T-G
Bob, et al -- ...and then Bob Showalter said... % % > -Original Message- % > From: David T-G [mailto:[EMAIL PROTECTED]] ... % > which will read stdin, spit out the key codes it gets until a ... % % How 'bout: % %perl -lpe '$_ = join ", ", unpack("c*", $_)' Aha! So I need to go a

RE: printing key codes

2002-06-04 Thread Bob Showalter
> -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 12:48 PM > To: perl beginners > Subject: printing key codes > > > Hi, all -- > > It seems like it should be a very easy thing to whip up a > perl one-liner > which will read stdin, spit out

Re: manipulating arrays/scalars

2002-06-04 Thread Steven_Massey
Thanks to John W Krahn and Shishir for your replys, need to learn about push -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

printing key codes

2002-06-04 Thread David T-G
Hi, all -- It seems like it should be a very easy thing to whip up a perl one-liner which will read stdin, spit out the key codes it gets until a ctrl-D, and then quit; something like perl -e 'while (<>) { print SomeMagicHere . \n; } would probably do it. But what is the magic part? How do

Re: only getting last value from regex

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Sven Bentlage said: >using the code below I only get the last line from the file. Let's look at your loops: while () { @user = split /;/; } That loops over each line of the file, splits the line on semicolons, and sets the @user array to that list returned. You are OVERWRITI

RE: avoiding 2nd process

2002-06-04 Thread Bob Showalter
> -Original Message- > From: HENRY,MARK (HP-Roseville,ex1) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 12:15 PM > To: '[EMAIL PROTECTED]' > Cc: HENRY,MARK (HP-Roseville,ex1) > Subject: avoiding 2nd process > > > All, > > Wondering what the best approach would be to the fol

avoiding 2nd process

2002-06-04 Thread HENRY,MARK (HP-Roseville,ex1)
All, Wondering what the best approach would be to the following. I have a script which copies files and sends mail notification appropriately. I want the script to check for new source files every 15 mins, however when there are new files, the operation will take long enough to the point where

only getting last value from regex

2002-06-04 Thread Sven Bentlage
Hi using the code below I only get the last line from the file. Can anybody tell me what I'm doing wrong? (The empty lines do not change anything..) Thanks for your help Sven file: John;123 Jane;456 Ed;789 code: open(USER,"<$user_access_file") or die

RE: system command interraction

2002-06-04 Thread Kipp, James
>try: >-- >#!/usr/bin/perl > >$date = `date +%y%m%e`; >$backup_dest = "/backup/home/" . "$date" . "-monthly"; >$archive_dest = "/backup/home/archives/" . "$date" . "-monthly"; >$backup_target = "/home/"; >$level = '0'; > >$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9 >$backup_targ

RE: system command interraction

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Kipp, James said: >$date = `date +%y%m%e`; >$backup_dest = "/backup/home/" . "$date" . "-monthly"; Needless quoting of $date, and there's no reason to separate $date from the rest of the string: $backup_dest = "/backup/home/$date-monthly"; >$archive_dest = "/backup/home/archives/"

Re: system command interraction

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Mat Harris said: >I want to issue the command to the command line, including the values of >these vars. I have tried backticking and the system('command here') but >they just send the vars as empty strings. Here's the program: #!/usr/bin/perl $date = `date +%y%m%e`; $backup_d

RE: system command interraction

2002-06-04 Thread Kipp, James
try: -- #!/usr/bin/perl $date = `date +%y%m%e`; $backup_dest = "/backup/home/" . "$date" . "-monthly"; $archive_dest = "/backup/home/archives/" . "$date" . "-monthly"; $backup_target = "/home/"; $level = '0'; $cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9 $backup_target"; system

system command interraction

2002-06-04 Thread Mat Harris
i am writing a perl script to run as a cron job and backup my files using dump. i have defined vars containing stuff like backup target, level of backup and so on. I want to issue the command to the command line, including the values of these vars. I have tried backticking and the system('comm

Re: AW: parsing xml files for variables

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 07:46 , Theuerkorn Johannes wrote: > Thanks for support, found an easy to use mod in cpan: http://search.cpan. > org/search?mode=module&query=XML called XML-QL which seems to do just > what i need. always remember: "If It works for YOU it

Re: third party databases and perl

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 05:33 , William West wrote: [..] > i would like to know what is needed for perl > to 1) interface with any third party database The simplest solution is to use the generic sorts of DB queries you can construct in say SQL - but I fear that these folks may not be exp

AW: parsing xml files for variables

2002-06-04 Thread Theuerkorn Johannes
Thanks for support, found an easy to use mod in cpan: http://search.cpan.org/search?mode=module&query=XML called XML-QL which seems to do just what i need. Wasn´t able to work through your example at wetware until now. Johannes > -Ursprüngliche Nachricht- > Von: drieux [SMTP:[EMAIL P

Re: Slow script

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Trevor Nichols said: >I've got two machines here which are pretty crappy but there seems to be >something seriously wrong somewhere. One machine, a Pentium 200 MMX >with 80MB ram runs a very simple script taking 5 seconds. > >t@data:~$ cat test.pl >use diagnostics; >use strict; > >prin

Re: Slow script

2002-06-04 Thread Jonathan E. Paton
> I've got two machines here which are pretty crappy but there seems to be > something seriously wrong somewhere. One machine, a Pentium 200 MMX > with 80MB ram runs a very simple script taking 5 seconds. *Drool* I have three 486/66 machines with 16Mb ram, that are on my home LAN. I log into t

Re: ideas and help with FS usage

2002-06-04 Thread Janek Schleicher
James Kipp wrote at Tue, 04 Jun 2002 16:24:04 +0200: > ... > here is some code: > -- > use File::Find; > find (\&wanted_user, "$dir"); > > sub wanted_user > { > %sum = (); > next unless (-d $_); > ($user,$size) = (stat($_))[4,7] or die "can't stat: $!\n"; push (

Re: Use of our

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 06:27 , Richard Adams wrote: [..] > The fog has lifted and all has become clear... [..] my complements to bob for the as expected excellent outline of the basics about lexical scoping. the other obligatory read is: http://perl.plover.com/FAQs/Namespaces.htm

ideas and help with FS usage

2002-06-04 Thread Kipp, James
i am writing a script that does a number os usage and space checking routines. having trouble with one of them. the plan here is to recurse thru a directory, record each uniqe user and add the size of the directories per user and then spit out a total like this: UserTotal usage in /s

RE: Slow script

2002-06-04 Thread Bob Showalter
> -Original Message- > From: Trevor Nichols [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 9:53 AM > To: [EMAIL PROTECTED] > Subject: Slow script > > > Hi All, > > I've got two machines here which are pretty crappy but there > seems to be > something seriously wrong somewher

Re: Slow script

2002-06-04 Thread Janek Schleicher
Trevor Nichols wrote at Tue, 04 Jun 2002 15:52:38 +0200: > I've got two machines here which are pretty crappy but there seems to be something >seriously wrong > somewhere. One machine, a Pentium 200 MMX with 80MB ram runs a very simple script >taking 5 > seconds. > > t@data:~$ cat test.pl > u

RE: skip first array entry and exit foreach loop only

2002-06-04 Thread David vd Geer Inhuur tbv IPlib
Hi, This is indeed much faster, just substitute the last directory off of the path when you're done checking with the current. Looks better indeed !! Nikola, using File::find searches all the files and as the directory's can hold many files and directory's I prefer to just do the test on 1 fil

Slow script

2002-06-04 Thread Trevor Nichols
Hi All, I've got two machines here which are pretty crappy but there seems to be something seriously wrong somewhere. One machine, a Pentium 200 MMX with 80MB ram runs a very simple script taking 5 seconds. t@data:~$ cat test.pl use diagnostics; use strict; print "hi\n"; t@data:~$ time

Re: Regex problem extracting middle-word part of string

2002-06-04 Thread Janek Schleicher
Rohesia Hamilton Metcalfe wrote at Thu, 30 May 2002 17:28:45 +0200: > #make array of cgi-scripts: > @Scripts=("f-.cgi", "f-bb.cgi", "f-.cgi", "f-.cgi", "f-ee.cgi", > "f-ff.cgi"); > > # pick one at random > srand; > $RandomScript = $Scripts[int(rand(@Scripts))]; > I agre

Re: remove the stop words

2002-06-04 Thread Janek Schleicher
Ying Liu wrote at Mon, 03 Jun 2002 17:11:22 +0200: > Is there a good method to do this? I need to remove the stop words from the comment >field of every > record. There are about 20,000 records. The comments look like this: > > Yersinia pestis strain Nepal (aka CDC 516 or 369 isolated from huma

RE: remove the stop words

2002-06-04 Thread David Gray
> Is there a good method to do this? I need to remove the stop > words from the comment field of every record. There are about > 20,000 records. The comments look like this: > > Yersinia pestis strain Nepal (aka CDC 516 or 369 isolated > from human) 16S-23S in tergenic region amplified with 1

Re: Use of our

2002-06-04 Thread Richard Adams
Many thanks, The fog has lifted and all has become clear... Richard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: skip first array entry and exit foreach loop only

2002-06-04 Thread Bob Showalter
> -Original Message- > From: David vd Geer Inhuur tbv IPlib > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 9:05 AM > To: [EMAIL PROTECTED] > Subject: skip first array entry and exit foreach loop only > > > > Hi, > > I am looking for a nice solution for the following proble

RE: skip first array entry and exit foreach loop only

2002-06-04 Thread Nikola Janceski
use File::Find and turn on the option 'bydepth'; http://search.cpan.org/doc/GSAR/perl-5.6.1-TRIAL3/lib/File/Find.pm > -Original Message- > From: David vd Geer Inhuur tbv IPlib > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 9:05 AM > To: [EMAIL PROTECTED] > Subject: skip firs

RE: Use of our

2002-06-04 Thread Bob Showalter
> -Original Message- > From: Richard Adams [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 6:13 AM > To: [EMAIL PROTECTED] > Subject: Use of our > > > Hi, > I'm sure this has been asked before, but I'm having a problem with > understanding "our". > > I get the idea of my, and

RE: New Here and Needing Help

2002-06-04 Thread Langa Kentane
You will not get any help if you don't detail your problem on the list. Everyone here is a volunteer, if you think someone is going to run after you trying to find out what your problem is then you're wrong. Rather e-mail the list with details of what problem you're experiencing in as much detail

skip first array entry and exit foreach loop only

2002-06-04 Thread David vd Geer Inhuur tbv IPlib
Hi, I am looking for a nice solution for the following problem : I have a directory stored in $header. I need to seek each directory for a specific file, but I have to start in the deepest dir and than go upwards. Using the split @header first value is always empty as it is splitting on " */*".

third party databases and perl

2002-06-04 Thread William West
i would like to know what is needed for perl to 1) interface with any third party database but mainly 2) interface with progress. now, i'm not worried about getting a tutorial- just a way to start... (tried using google and CPAN but haven't been able to get good results (probably my lack o

Re: split

2002-06-04 Thread David T-G
Sudarsan, et al -- ...and then Sudarsan Raghavan said... % % > ($bash, ($rest)) = split(/\s/, $line); % % $rest will still only contain 'FRI'. This is the same as % my ($a) = (1, 2, 3, 4); % $a becomes 1 after this 2, 3, 4 are just ignored *sigh* Well, thanks for the clarification (how did

Re: split

2002-06-04 Thread Sudarsan Raghavan
> > > ($bash, ($rest)) = split(/\s/, $line); $rest will still only contain 'FRI'. This is the same as my ($a) = (1, 2, 3, 4); $a becomes 1 after this 2, 3, 4 are just ignored > > > to force the slurp and then dump it into a string. Try 'em both; neither > is tested. > -- To unsubscribe, e

Re: split

2002-06-04 Thread Sudarsan Raghavan
[EMAIL PROTECTED] wrote: > hi guys, > I would like to split a line like that > > # FRI MAY 02 > > in two parts: > > $bash = # > $rest = FRI MAY > > in my version ($bash, $rest) = split(/\s/, $line); Change this line to ($bash, $rest) = split (/\s/, $line, 2); perldoc -f split > > >

Re: split

2002-06-04 Thread Shawn
Hello stefan, You will need just a basic regex, not a split my $string='# FRI MAY 02'; $string=/(.*?)\s+(.*)/; my $bash=$1; my $rest=$2; Shawn - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 04, 2002 6:49 AM Subject: split hi guys,

Re: split

2002-06-04 Thread David T-G
Stefan -- ...and then [EMAIL PROTECTED] said... % % hi guys, % I would like to split a line like that % % # FRI MAY 02 % % in two parts: % % $bash = # % $rest = FRI MAY Hokay... % % % in my version ($bash, $rest) = split(/\s/, $line); % % $rest only contains "FRI" because the

split

2002-06-04 Thread Stefan.Haberer
hi guys, I would like to split a line like that # FRI MAY 02 in two parts: $bash = # $rest = FRI MAY in my version ($bash, $rest) = split(/\s/, $line); $rest only contains "FRI" because the line is splitted at every blank. how can I achieve that the line ist splitted only at th

Use of our

2002-06-04 Thread Richard Adams
Hi, I'm sure this has been asked before, but I'm having a problem with understanding "our". I get the idea of my, and also variable declared without a qualifier is visible to all packages/modules..also that $package::varname can be used to access a global variable in another package... But the

Re: Hibernation <--- Misplaced... ignore

2002-06-04 Thread Jonathan E. Paton
Oops, redirecting to: [EMAIL PROTECTED] Jonathan Paton = s''-//--/\\///|-\/\|--\--/-\-/\-//\-|/\\\|/\///|-\--', s''/-\\\/|///|-|/|/--\--/--//\|\/\||/|/-/\\\-/\///|-\-\-', y'|\/-'3210',$_=join qq\\,map{s|2|10|||s|3|11|||s|^|0|;$_} m|.|g;map{print chr unpack'N',pack'B32','0'x24 .$_}/.{8}/

Re: Hibernation

2002-06-04 Thread Jonathan E. Paton
> (Please correct me if this is the wrong list for my proposal.) Treasure Hunt for it: http://www.cpan.org/ there is one, even if it is [EMAIL PROTECTED] > I was wonder if it would be possible / usefull to add a hibernation > functionality to the Perl 6 Language, possibly via a Module. > (but

Re: removing duplicate files in a directory

2002-06-04 Thread Felix Geerinckx
on Mon, 03 Jun 2002 17:56:18 GMT, [EMAIL PROTECTED] (Jeremy T. Miller) wrote: > So, a folder having these files: > > HTTPLogWed 32 kb > HTTPLogWed1 32 kb > HTTPLogWed2 32 kb > HTTPLogWed 42 kb That's impossible. You cannot have two file with the same name in the same folder. Furthermore,

Re: New Here and Needing Help

2002-06-04 Thread Felix Geerinckx
on Tue, 04 Jun 2002 07:44:51 GMT, [EMAIL PROTECTED] wrote: > I am trying to do some cgi scripts for my website, and I keep > getting the internal error message. If anyone can please help me > out, contact me and Ill give more details on the problem. That's not how a mailing list works. Post you

New Here and Needing Help

2002-06-04 Thread CJCManagement
Hello Everyone! I am trying to do some cgi scripts for my website, and I keep getting the internal error message. If anyone can please help me out, contact me and Ill give more details on the problem. Camilla J. Colburn CJC Management and Marketing Business Phone: 1-(256)-386-7175 Email A