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. 'd

svn library problem

2006-03-15 Thread Ged Murphy
Hi all. I'm trying to build a simple SVN app using the subversion supplied perl SVN bindings, which include all required libs in an SVN directory. However I'm receiving a strange error, can anyone help? *Test code: * use strict; use warnings; use Data::Dumper; use SVN::Client; $Data::Dumper::In

Learn 2 languages

2004-12-02 Thread Murphy, Ged (Bolton)
A little OT, but I'm trying to learn 2 languages at once, C++ and perl. Is this typically a good or bad idea? So far it appears to be going OK and I'm well into using perl modules and creating C++ classes. My worry is as the topics get more complex and I start to learn the ins and outs, will the

RE: how to pass array and variable

2004-11-09 Thread Murphy, Ged (Bolton)
Ajey Kulkarni wrote: > >Hmmm...Whenever you pass array AND a variable with array being first, >the subroutine takes the variable and appends to array. > >Make sure you pass var first,followed by array. There is no need to >complicate with the array ref IMHO. What if you want to pass 2 or more arr

RE: start http request and move on

2004-11-05 Thread Murphy, Ged (Bolton)
-Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: 05 November 2004 15:14 To: [EMAIL PROTECTED] Subject: Re: start http request and move on Thanks Jose, and Randal too :), very close indeed the only difference is I don't want the user to wait at all, just submit

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Murphy, Ged (Bolton)
Chris Devers wrote: >> Can you not just run uname? >> >> $SystInfo = `uname -a` > >And then what? > >I'm writing this mail on a Powermac G5 -- nominally a 64-bit machine. > >$ uname -a >Darwin cesar 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 >PDT 2004; root:xnu/xnu-517.7.2

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Murphy, Ged (Bolton)
Ramprasad A Padmanabhan wrote: > In a particular script , that is used on multiple unix platforms, I > need to know if my perl script is being run on a 32 bit machine or a > 64 bit machine > > Is there any way I can find this portably Can you not just run uname? $SystInfo = `uname -a`

RE: help me

2004-10-30 Thread Murphy, Ged (Bolton)
rocky karhe wrote: >i am new to php. >Can u plz elaborate how to get it from headers. >Is there any function to do so. This is perl, not php. I'm new also but seeing as the list is quiet I'll have a go. Are you familiar with objects? A quick search on CPAN pulled up the Mail::Folder module. This

using file before and after when in foreach loop

2004-10-29 Thread Murphy, Ged (Bolton)
Hi all. I'm using a foreach loop to iterate through an array and print out HTML code related to each value. However in my HTML code I would also like to make links to the previous array item and next array item. The previous item is simple to do, but I'm struggling to think of a way of getting th

RE: Accessing 2D array

2004-10-28 Thread Murphy, Ged (Bolton)
>I've been trying to solve this problem using many techniques I found >on the websites but still unsuccessfully > >sub func { > my (@local_array) = @_; > > for (my $i=0;$i<@local_array;$i++) { > for (my $j=0;$j<@local_array[$i];$j++) { > print "$local_array[$i[[$j] "; > } >

using 'my' problem

2004-10-27 Thread Murphy, Ged (Bolton)
he start of the program? above the subroutine? Thanks. #!/usr/bin/perl use strict; use warnings; #use Image::Magick::Thumbnail; # set directory to read images from my $dir = "/ged/code/photo/vx"; # read all files from given directory opendir DH, $dir or die "Cannot open $dir: $!&

RE: MySQL+foreach loop.........roy

2004-10-26 Thread Murphy, Ged (Bolton)
Roime bin Puniran, wrote: >#Prepare the insert SQL >my $rec = $dbh->prepare("INSERT INTO t_flows(ipSrc, ipDst, pktSent, bytesSent, startTime, endTime, srcPort, >dstPort, tcpFlags, proto, tos) VALUES ('$value1', '$value2', '$value3', '$value4', '$value5', '$value6', >'$value7', '$value8', '$va

RE: executing 1 liners from cmd prompt

2004-10-20 Thread Murphy, Ged (Bolton)
>You can't use "'" as delimiter on Windows. Try: > > perl -e "print \"test\n\"" ahh, I didn't realise. Thanks Gunnar. The information contained in this message or any of its attachments is confidential and is intended f

executing 1 liners from cmd prompt

2004-10-20 Thread Murphy, Ged (Bolton)
Hi all, How do you execute 1 liners from the windows command prompt similar to perl -e 'print "test\n";' that we run in unix like systems? Every time I try something along these lines I get the following error C:\perl>perl -e 'print "test\n"' Can't find string terminator "'" anywhere before E

RE: printing block of text

2004-09-30 Thread Murphy, Ged (Bolton)
>Hi, > >your code works fine for my debian box. >-- >[EMAIL PROTECTED]:~/Stuff$ perl -v > >This is perl, v5.8.3 built for i386-linux-thread-multi >-- Must be the interpreter then. That is weird. This is being written for a Linux box so I'll just comment it out until then. Thanks. ***

RE: printing block of text

2004-09-30 Thread Murphy, Ged (Bolton)
>> I'm trying to print a block of code using 'print <> getting an error stating perl can't find the termination label. >> Test code and error as follows: >> >> #!/usr/bin/perl >> >> print <> this is my tester text >> TEST >> >> Can't find string terminator "TEST" anywhere before EOF at photo.pl

printing block of text

2004-09-30 Thread Murphy, Ged (Bolton)
I'm trying to print a block of code using 'print and then delete this message. Exide Technologies is an industrial and transportation battery producer and recycler with operations in 89 countries. Further information can be found at www.exide.com -- To unsubscribe,

Re: subroutine problem

2003-09-27 Thread Ged
Jeff / Joseph, Thanks for you replies. Appologies about commenting out the 'use strict'. I was playing about with the program and was checking the different errors I got with and without it. Didn't realised it was still commented when I posted. Its funny, but I spent about an hour trying to get

Re: RE: perl questions / exercices

2003-09-05 Thread Ged
Sounds interesting. I'll give it a whirl. Hope you won't be waiting for me to code it though as it might take me a while to get it running smoothly, esspeically with it being cross platform. > > From: Shishir Saxena <[EMAIL PROTECTED]> > Date: 2003/09/05 Fri AM 10:33

perl questions / exercices

2003-09-05 Thread Ged
x27; etc I need more exercises, if not small projects to further my skills. Its not easy to think up usefull projects, so my question is, does anybody know of anything on the net to challenge me Thanks, Ged. (p.s. I am still in the early stages so long complicated projects are still a little

Re: Re: modifing and writing to a file (solved)

2003-07-24 Thread Ged
print "e.g. program.pl \n"; } Hopefully it may be of some use to somebody else starting out and stumbling in this area. > > From: Ged <[EMAIL PROTECTED]> > Date: 2003/07/24 Thu AM 08:47:23 GMT > To: [EMAIL PROTECTED] > Subject: Re: Re: modifing and

Re: Re: modifing and writing to a file

2003-07-24 Thread Ged
ahhh, thanks. Yes, that makes sense now. after reading up on the 'uc' function, I have now got my program to work as required. Thanks to all for their input. Ged. > > From: Sudarshan Raghavan <[EMAIL PROTECTED]> > Date: 2003/07/24 Thu AM 08:43:55 GMT > To: [EM

modifing and writing to a file

2003-07-24 Thread Ged
the original file. Here is my code: $stuff="c:/ged/perl files/stuff.txt"; $backup="c:/ged/perl files/stuff.bk"; open STUFF, $stuff or die "Cannot open $stuff for read :$!"; open BACKUP, ">$backup" or die "Cannot open $backup for write :$!";