Re: IPC::Open2 and mod_perl

2008-08-03 Thread Jeff Pang
Hello, Since this is most likely a modperl question, I suggest you'd better ask it to modperl list: http://lists.cpan.org/showlist.cgi?name=modperl-user Good luck! Ryan 写道: > I'm trying to do this under mod_perl2: > > use IPC::Open2; > my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/princ

slightly OT -- launching script in iTerm.app or Terminal.app

2008-08-03 Thread David Newman
How to launch a perl script when starting iTerm.app or Terminal.app in OS X? Thanks in advance and apologies for the slightly OT post. dn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Array always compares equal

2008-08-03 Thread Mr. Shawn H. Corey
On Sat, 2008-08-02 at 06:31 -0700, hsfrey wrote: > I'm trying to set up a list of words to ignore in a text. > I tried it like this: > > my @ignore = ("U.S.C", "Corp", "Miss", "Conf", "Cong"); > > and later in a loop > > if ( $exists $ignore [$lastWord] ) { next;} > > But that tested positive f

Re: regular expression problem

2008-08-03 Thread jordilin
On Aug 1, 9:28 am, [EMAIL PROTECTED] wrote: > I'm trying to substitute all comma separated numbers in a text file > with the same numbers without commas.  This expression will match the > numbers: \d{1,3}?(,\d\d\d)+ but how do i refer to each 3 digit block > after the commas so i can substitute for

Re: getting process id under NT

2008-08-03 Thread Ron Bergin
On Aug 1, 9:43 am, [EMAIL PROTECTED] (Epanda) wrote: > I have tried your pm and it works well on XP but does not on my NT > platform. > > I have the following error : Error - Variant '$_[0]' support status is > unknown. This can happen if > you 'use Win32::Process::Info ();'. Please do not

Array always compares equal

2008-08-03 Thread hsfrey
I'm trying to set up a list of words to ignore in a text. I tried it like this: my @ignore = ("U.S.C", "Corp", "Miss", "Conf", "Cong"); and later in a loop if ( $exists $ignore [$lastWord] ) { next;} But that tested positive for EVERY $lastWord and skipped every time ! It did the same when I us

IPC::Open2 and mod_perl

2008-08-03 Thread Ryan
I'm trying to do this under mod_perl2: use IPC::Open2; my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/prince -'); I've also tried this: use IPC::Open2; my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/prince', ' - ' ); It works from a normal command line script, but it seems to mess

Re: Sorting!

2008-08-03 Thread Rob Dixon
Gunwant Singh wrote: > Rob Dixon wrote: >> >> my @sorted = sort { >> my @a = split /:/, $a; >> my @b = split /:/, $b; >> $a[1] <=> $b[1]; >> } @list; >> >> print "$_\n" foreach @sorted; > > I got what your code says.Thanks a lot!! > Can you tell me what is $a[1] <=> $b[1] doing for me? It co

Re: Sorting!

2008-08-03 Thread Gunwant Singh
Rob Dixon wrote: Gunwant Singh wrote: Hi all, I really appreciate all you guys there for the help you've provided to me in the past. So here I am again with a Question. I have a file with the following entries: 1:17 4:3 4:11 4:13 11:16 12:10 13:2 19:5 20:7 26:12 28:4 33:15 33:17 35:9 36: