Re: pattern matching problems

2006-07-08 Thread Mumia W.
Dr. Claus-Peter Becke wrote: [...] foreach (/(\w+)/i) { push @words,$&; } print$q->popup_menu('to_thesaurus', @words); [...] Use the /g (global) option to the match operator, and push $_ onto @words rather than $&: foreach (/(\w+)/ig) { push @words, $_; } Or ditch the 'foreach'

Re: how to avoid "spawning" multiple process of the same script ..

2006-07-08 Thread Ken Foskey
On Wed, 2006-07-05 at 22:50 -0700, BenBart wrote: > Hi all, > > How do I prevent multiple instance of the same script from running? > > That is for example, if I have a script named script1.pl and it is > already running, I want the script to be able to check that it is > already running and th

Re: write out filenames of files existing on a filesystem into afile

2006-07-08 Thread Rob Dixon
John W. Krahn wrote: Hi John [snip OP] use warnings; use strict; my $path = $ARGV[ 0 ]; open FILE, '>', 'c:/filelist.txt' or die "Can't open c:/filelist.txt: $!"; opendir DIR, $path or die "Can't open $path: $!"; print FILE map /^\.\.?$/ ? () : "$_\n", readdir DIR; I favour print FILE

Re: write out filenames of files existing on a filesystem into afile

2006-07-08 Thread Randal L. Schwartz
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: Rob> I favour Rob>print FILE "$_\n" foreach grep /[^.]/, readdir DIR; Rob> for clarity But certainly not for correctness! It's easy to look pretty if you don't care about the right answer. Your regex rejects *any* filename that contains

File test operator -C in Win32

2006-07-08 Thread Monomachus
What does really means -C file test operator on Win32 platform? Creation time or what? == Thanks, Monomachus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Another exercice

2006-07-08 Thread Monomachus
OK here is the deal You have smth like this: -> 'begin''end' ->'sign' -> <>>>';' Ok & now u should separate the elements from '' in @list1, and those from <> in @list2 . Don't forget that you could have the elements << or >> in a tag , i.e. <<<> o

perl modules: PERL5LIB, PREFIX, LIB, and site_perl confusion

2006-07-08 Thread Erik Paulson
I'm confused about installing where Perl modules get placed. The standard answer "how do I install a perl module without root" is perl Makefile.PL PREFIX=/some/path/to/my/modules and then either a 'use lib /some/path/to/my/modules' or setenv PERL5LIB /some/path/to/my/modules However, wheneve

Re: pattern matching problems

2006-07-08 Thread Mumia W.
Dr. Claus-Peter Becke wrote: dear mumia w., thank you for your support. i have chosen the simplest solution you recommanded. i still have one problem. i would like to print every word in a new line. push @woerter,/[a-zäöüß]/ig; print$q->li(@woerter); it's unfortunaltely impossible to ch

Fw: Another exercice

2006-07-08 Thread Monomachus
--- Forwarded message -- From: Monomachus <[EMAIL PROTECTED]> To: Date: 08.07.06 18:24 Subject: Another exercice OK here is the deal You have smth like this: -> 'begin''end' ->'sign' -> <>>>';' Ok & now u should separate the elements from '' in @

Fw: File test operator -C in Win32

2006-07-08 Thread Monomachus
--- Forwarded message -- From: Monomachus <[EMAIL PROTECTED]> To: Date: 08.07.06 18:12 Subject: File test operator -C in Win32 What does really means -C file test operator on Win32 platform? Creation time or what? == Thanks, Monomachus --- End of forwarded message --

Undelivered Mail Returned to Sender

2006-07-08 Thread Monomachus
I don't know why my emails don't pass the Spam Firewall when I want to send a letter to beginners@perl.org --- Forwarded message -- From: Mail Delivery System <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: 08.07.06 23:20 Subject: Undelivered Mail Returned to Sender This is the Spam Firewall

File test operator -C in Win32

2006-07-08 Thread Monomachus
What does really means -C file test operator on Win32 platform? Creation time or what? == Thanks, Monomachus - This e-mail was sent using Mail.md -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Another exercice

2006-07-08 Thread Monomachus
OK here is the deal You have smth like this: -> 'begin''end' ->'sign' -> <>>>';' Ok & now u should separate the elements from '' in @list1, and those from <> in @list2 . Don't forget that you could have the elements << or >> in a tag , i.e. <<<>

Re: Undelivered Mail Returned to Sender

2006-07-08 Thread Mumia W.
Monomachus wrote: I don't know why my emails don't pass the Spam Firewall when I want to send a letter to beginners@perl.org --- Forwarded message -- From: Mail Delivery System <[EMAIL PROTECTED]> [...] Your messages are making it onto the list. This bounce happened because a subscriber's ma

Re: write out filenames of files existing on a filesystem into afile

2006-07-08 Thread Rob Dixon
(Randal L. Schwartz) wrote: Hi Randal >>"Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: > > > Rob> I favour > > Rob>print FILE "$_\n" foreach grep /[^.]/, readdir DIR; > > Rob> for clarity > > But certainly not for correctness! It's easy to look pretty if you don't care > about the right

Re: write out filenames of files existing on a filesystem into a file

2006-07-08 Thread Mathew Snyder
The most direct way I can think of would be to simply open the file again and read each line writing it to another file exactly as you want. I'm still rather inexperienced with perl myself so I wouldn't know off-hand how to do this exactly. Mathew Nishi Bhonsle wrote: > Mathew: > > Thanks. I m