Environment veriable

2006-09-08 Thread john wright
Hi All, I want to call vcvars32.bat from perl script and effectively borrow the variables from that batch file. If I use system call, the variables set in the batch file are lost when the execution come out of the system call . Thanks John -

Re: Environment veriable

2006-09-08 Thread Jack Faley ( The Tao of Jack )
Do these variables change while perl is running? Otherwise you could set the variables in the batch file and have it call perl. On 9/8/06, john wright <[EMAIL PROTECTED]> wrote: Hi All, I want to call vcvars32.bat from perl script and effectively borrow the variables from that batch file. If

RE: looping through complicated hashes..

2006-09-08 Thread Charles K. Clarkson
Michael Alipio wrote: : ignore this one.. I've already figured out how. Why not post your solution for the archives? Someone else may run across your question during a search and will not know the answer you found. HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate We

Re: looping through complicated hashes..

2006-09-08 Thread Jack Faley ( The Tao of Jack )
On 9/8/06, Charles K. Clarkson <[EMAIL PROTECTED]> wrote: Michael Alipio wrote: : ignore this one.. I've already figured out how. Why not post your solution for the archives? Someone else may run across your question during a search and will not know the answer you found. HTH, Charles K.

Re: New-Line in Regular Expression

2006-09-08 Thread Romeo Theriault
Wow, thank you to everyone whom responded on this one, it's great to get really good responses. Rob, you have some really good points in your email and your code works great. Thank you. But there is one part that I don't fully understand. In this piece of the code, while () { if (/user ([\w.]

Re: Extract digits from string

2006-09-08 Thread J. Alejandro Noli
Jeff Pang <[EMAIL PROTECTED]> writes: > Hi,how about this? > > my @array = $data =~ /\((\d+)\)/g; And what does this means ^^ ? Thanks ! > > -Original Message- >>From: john wright <[EMAIL PROTECTED]> >>Sent: Sep 5, 2006 11:29 AM >>To: beginners@perl.org -- To unsubscribe, e-m

Re: Removing malicious code

2006-09-08 Thread Jay Savage
On 9/8/06, Owen <[EMAIL PROTECTED]> wrote: I have a cgi script that processes a form in which the following line of code is found $name =~ s/[`\\"_|!\$\.\^]//g; #remove likely malicious bad characters Just wondering if there is a better way to do this as I suspect I am a little naive. Need

Re: regular expression question

2006-09-08 Thread chen li
--- David Romano <[EMAIL PROTECTED]> wrote: > chen li wrote on Thu, Sep 07, 2006 at 01:13:04PM > PDT: > > > > > One more question what if I have a file that > have > > > > different lines 1) some lines have number only > 2) > > > some > > > > lines have more than 2 words at the begining? > > >

Re: Sorting on HoHoH

2006-09-08 Thread Hardly Armchair
John W. Krahn wrote: Hardly Armchair wrote: Hello List, Hello, I have a data structure like so: %p_mod = { ^ You are using the wrong punctuation. That would produce a warning if you had warnings enabled. Sorry. I'm actually generating this data structure dynamically and just

Re: regular expression question

2006-09-08 Thread David Romano
chen li wrote on Fri, Sep 08, 2006 at 09:34:03AM PDT: > One more question about this regex: > > @data = m/(\D+[^\d\s]|\d+)/g; > > I check Programming Perl or perldoc they say ^ is used > as an anchor meaning "start/begining with". But here > looks like it has a different usage. Is that right? Yes

Re: Extract digits from string

2006-09-08 Thread Andy Greenwood
start with the regex. It's going to look in $data for items that match and return the elements caught by the ()'s into @array. the regex will catch anything that: 1) starts with a ( 2) is made up of at least 1 digit character 3) ends with a ) On 9/8/06, J. Alejandro Noli <[EMAIL PROTECTED]> wro

Re: Extract digits from string

2006-09-08 Thread Juan Pablo Feria Gomez
> my @array = $data =~ /\((\d+)\)/g; And what does this means ^^ ? is not an ^, is / next to a \(/\) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Sorting on HoHoH

2006-09-08 Thread Rob Dixon
Hardly Armchair wrote: > > Hello List, > > I have a data structure like so: > > %p_mod = { > 'A' => { > 'fingers' => { > '4' => 'ABSFMQS', > '5' => 'SMTFQNL', >}, >

prototype?

2006-09-08 Thread Budi Milis
Hi, I saw some script on the net using prototype to define subroutines, but most scripts are still not using it. Is this a good practice/advisable (like use strict) and whats the benefits? TIA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: prototype?

2006-09-08 Thread John W. Krahn
Budi Milis wrote: > Hi, Hello, > I saw some script on the net using prototype to define subroutines, > but most scripts are still not using it. > Is this a good practice/advisable (like use strict) and whats the benefits? See: http://library.n0i.net/programming/perl/articles/fm_prototypes/ Joh