Perl equivalent of JavaScript match

2005-10-11 Thread Frank Geueke, III
Hi. I need to grab regex matches from a string in perl. The string is an enum data type in Mysql. i.e. enum('Berks','Carbon','Lehigh','Montgomery') So basically I need a match on alphabetic chars between single quotes. No problem. But I'd like to be able to grab each match and store it in an

multiple overlapping matches in a regex

2005-10-03 Thread Frank Geueke, III
There's probably a really simple answer to this one. I'm trying to find multiple matches to a regex within a file, replace them, and save in another file... #!/usr/bin/perl -w use warnings; use strict; open(INFILE, 1.ls) or die(Couldn't open input file.\n); open(OUTFILE, 3.ls) or die(Couldn't

here tag and internal variable

2005-09-23 Thread Frank Geueke, III
Thanks for the help with the reverse if and else. I ended up sigh using a single line forward if on a single line. Now my next question. I'm using a jumbo here tag (I think that's what they're called) to add html to a string. I need to use a variable within the tag (done this before, no

Reverse If and Normal Else

2005-09-22 Thread Frank Geueke, III
Hi everyone. Okay, so maybe this one is a silly question. I have a fairly large script and I have a bunch of places where I'm following a reverse if with a normal else and perl keeps complaining about it. It seems to make sense to me, but I guess its bad syntax. Here is one of them:

getting error from backtick shell execution

2005-09-07 Thread Frank Geueke, III
Hi Everyone. I've been reading the list for the past few days now and I have something maybe worth asking. What I am wondering about at the moment is how to get a possible error message from a command that is run in the shell. i.e. my $cmd = sudo -u userlogin . /usr/bin/ssh -l $cnrip_user