regex help

2006-04-19 Thread Murphy, Ged (Bolton)
Hi all. I have a log containing strings as follows : 21259 auditO 72398 Mar 09 00:18 dll/ldr/elf.c The format is the same throughout with the exception of the 'O', as it doesn't always appear. I need to match when the 'O' appears and when it does, I need to save the file path, i.e.

RE: parent / child PID / wait q

2006-04-19 Thread Henry, Mark Patrick
Joshua, Thanks for the advice. While this may be true, the complexity of setting up such a solution is far beyond my abilities and time right now. Also, this is more of a generic IPC type question as I could apply a wait/pid solution in a number of more localised scenarios. Thanks! -M

using PDF:FDF module

2006-04-19 Thread Dan Hunter
After trying and failing to get the Acrobat FDF modules to work (not compatible with version 5.8??), I've successfully managed to install PDF::FDF::Simple from CPAN. What I am trying to do is read a submission from a pdf form sent using fdf, and then to do some manipulation (which I don't have a

Function call problem

2006-04-19 Thread Nath, Alok (STSD)
Hi all, Can anybody help me to figure out why the first function call works but the second one is unable to do it. Only difference is I am using DownloadFolder variable to send the value. #FtpVM('test.americas.corp.net', '/1.00/_releases/1_00_00_052',

RE: regex help

2006-04-19 Thread Thomas Bätzler
Hi, Murphy, Ged (Bolton) [EMAIL PROTECTED] asked: I have a log containing strings as follows : 21259 auditO 72398 Mar 09 00:18 dll/ldr/elf.c The format is the same throughout with the exception of the 'O', as it doesn't always appear. I need to match when the 'O' appears and

Re: regex help

2006-04-19 Thread Xavier Noria
On Apr 19, 2006, at 9:13, Murphy, Ged (Bolton) wrote: Hi all. I have a log containing strings as follows : 21259 auditO 72398 Mar 09 00:18 dll/ldr/elf.c The format is the same throughout with the exception of the 'O', as it doesn't always appear. I need to match when the 'O'

Re: regex help

2006-04-19 Thread John W. Krahn
Murphy, Ged (Bolton) wrote: Hi all. Hello, I have a log containing strings as follows : 21259 auditO 72398 Mar 09 00:18 dll/ldr/elf.c The format is the same throughout with the exception of the 'O', as it doesn't always appear. I need to match when the 'O' appears and when it

Re: Function call problem

2006-04-19 Thread John W. Krahn
Nath, Alok (STSD) wrote: Hi all, Hello, Can anybody help me to figure out why the first function call works but the second one is unable to do it. Only difference is I am using DownloadFolder variable to send the value. #FtpVM('test.americas.corp.net',

template loop question

2006-04-19 Thread Graeme McLaren
Hi, I'm working with template loops today and I was thinking I would write a function to pass an array of hashes to the template loop a bit like: $template-param(pos_colours =colours()); sub colours{ my @colours =( { id = '',is_selected =

RE: beginner help

2006-04-19 Thread M K Scott
Well, it may not be the ideal solution but just for the record I got it to work. I used a scalar to contain the correect value: $pound = chr 156; Then used unshift to add it to the array. unshift @array, $pound; Seems to have done the trick which is all I was after. Cheers for

Re: template loop question

2006-04-19 Thread Mr. Shawn H. Corey
On Wed, 2006-19-04 at 11:30 +0100, Graeme McLaren wrote: Hi, I'm working with template loops today and I was thinking I would write a function to pass an array of hashes to the template loop a bit like: $template-param(pos_colours =colours()); sub colours{ my @colours =(

Re: Interprocess communications for Windows Perl

2006-04-19 Thread Karjala
I guess then sockets is the right way for my case. Thanks. zentara wrote: Personally, I would stick with sockets, since it is more foolproof and well tested. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: using PDF:FDF module

2006-04-19 Thread Tom Phoenix
On 4/18/06, Dan Hunter [EMAIL PROTECTED] wrote: I've successfully managed to install PDF::FDF::Simple from CPAN. I am totally unable to understand what I need to do from the CPAN module description. Can anyone give me some guidance on how to interact with that module and get data into

Re: beginner help

2006-04-19 Thread JupiterHost.Net
M K Scott wrote: Well, it may not be the ideal solution but just for the record I got it to work. I used a scalar to contain the correect value: $pound = chr 156; Then used unshift to add it to the array. unshift @array, $pound; Seems to have done the trick which is all I

RE: How to use proxy with LWP?

2006-04-19 Thread siegfried
Alan, This worked for me! Thanks, Siegfried #!c:/Perl/bin/Perl.exe # Begin commands to execute this file using Perl with bash # perl test-proxy.pl # End commands to execute this file using Perl with bash package test; require Exporter; our @ISA = qw(Exporter); our @EXPORT =

When to use the begin statement?

2006-04-19 Thread siegfried
This code works, but I don't understand it. It is in a source file with the extension of .pm. I have a static variable agent that needs to be initialized prior to the first function call. Should not I need to use the BEGIN statement so the cookie and proxy functions get called? Apparently they

Re: When to use the begin statement?

2006-04-19 Thread Mr. Shawn H. Corey
On Wed, 2006-19-04 at 14:05 -0600, siegfried wrote: This code works, but I don't understand it. It is in a source file with the extension of .pm. I have a static variable agent that needs to be initialized prior to the first function call. Should not I need to use the BEGIN statement so the

Re: combine 2 open for reading filehandles

2006-04-19 Thread JupiterHost.Net
John W. Krahn wrote: JupiterHost.Net wrote: Howdy list :) Hello, I'm having a bit of a time with combining 2 read filehandles. The FAQ has a good explanation about that: perldoc -q stderr That was informative, thanks! I ended up using IO::Select to process the open3 read and

Re: combine 2 open for reading filehandles

2006-04-19 Thread JupiterHost.Net
I didn't test this so don't assume it will work, but I think it should ;-) eof should return true if there is nothing left to read. So, instead of using which will block until there's something to read (or the fh is closed), you could periodically test eof on your file handles. Perhaps

pid / waiting cont.

2006-04-19 Thread Henry, Mark Patrick
Thanks to all who responded to my earlier message. My problem has evolved somewhat and I have some new questions :) What I have now is the desire to update a hash value from within a CHLD signal handler subroutine. That is, a main loop is constantly watching the values of a set of hash keys.

golf

2006-04-19 Thread Chad Perrin
This is kind of a frivolous question, but . . . is there some way to golf this? while () { s/\n/ /; print; } -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] There comes a time in the history of any project when it becomes necessary to shoot the engineers and begin production.

RE: golf

2006-04-19 Thread Timothy Johnson
You mean like this? perl -p -e s/\n/ / (Some tweaking may be necessary for non-Win32 OS) -Original Message- From: Chad Perrin [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 6:36 PM To: beginners@perl.org Subject: golf This is kind of a frivolous question, but . . . is

Re: golf

2006-04-19 Thread Mr. Shawn H. Corey
On Wed, 2006-19-04 at 19:36 -0600, Chad Perrin wrote: This is kind of a frivolous question, but . . . is there some way to golf this? while () { s/\n/ /; print; } perl -pe 's/\n/ /' See `perldoc perlrun` and search for 'Command Switches'. -- __END__ Just my 0.0002 million

Re: golf

2006-04-19 Thread John W. Krahn
Chad Perrin wrote: This is kind of a frivolous question, but . . . is there some way to golf this? while () { s/\n/ /; print; } perl -012l040pe1 yourfile John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: golf

2006-04-19 Thread Randy W. Sims
Chad Perrin wrote: This is kind of a frivolous question, but . . . is there some way to golf this? while () { s/\n/ /; print; } perl -pl04 -e1 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: golf

2006-04-19 Thread Randy W. Sims
Chad Perrin wrote: This is kind of a frivolous question, but . . . is there some way to golf this? while () { s/\n/ /; print; } perl -pl40 -e1 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: golf

2006-04-19 Thread Chad Perrin
On Wed, Apr 19, 2006 at 06:51:21PM -0700, Timothy Johnson wrote: You mean like this? perl -p -e s/\n/ / Thanks. I looked -p up in perlrun and learned something new. It's not quite what I set out to learn, but learning new things is good anyway. I was actually looking for something doable

Re: golf

2006-04-19 Thread Chad Perrin
On Wed, Apr 19, 2006 at 07:58:59PM -0600, Chad Perrin wrote: On Wed, Apr 19, 2006 at 06:51:21PM -0700, Timothy Johnson wrote: You mean like this? perl -p -e s/\n/ / Thanks. I looked -p up in perlrun and learned something new. It's not quite what I set out to learn, but learning

RE: golf

2006-04-19 Thread Ankur Gupta
Chad Perrin mailto:[EMAIL PROTECTED] scribbled on Wednesday, April 19, 2006 6:59 PM: On Wed, Apr 19, 2006 at 06:51:21PM -0700, Timothy Johnson wrote: You mean like this? perl -p -e s/\n/ / Thanks. I looked -p up in perlrun and learned something new. It's not quite what I set out to

Re: golf

2006-04-19 Thread Chad Perrin
On Thu, Apr 20, 2006 at 07:35:16AM +0530, Ankur Gupta wrote: { local $/ = undef; while () { s/\n/ /sg; print; } } The goal in golf is to get the ball in the hole with less strokes, not more. -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] The

Re: encoding of source file

2006-04-19 Thread Brano Gerzo
M. Kristall [MK], on Monday, April 17, 2006 at 19:38 (-0400) wrote about: MK Try Encode::Guess MK http://search.cpan.org/~dankogai/Encode-2.15/lib/Encode/Guess.pm I forgot to thank you, so thanks! I knew there must be something already done. :) -- www.opensubtitles.org - biggest open DivX