Re: A second beginner's question

2005-01-15 Thread Edward Wijaya
On Fri, 14 Jan 2005 09:47:50 -0800, John W. Krahn <[EMAIL PROTECTED]> wrote: Perl has a FAQ on shuffling, have you read that yet? perldoc -q shuffle or use CPAN module: List::Util it has a built in *shuffle* function. -- Edward WIJAYA Singapore -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: A second beginner's question

2005-01-14 Thread John W. Krahn
Doug Essinger-Hileman wrote: Now that I have the earlier snippet working (and thank you to all who helped), I am working on shuffling my array. Basically, the array is a list of names in the order they will receive a job assignment. Every third week, I want to shuffle the order. I have tested th

Re: A second beginner's question

2005-01-14 Thread Lawrence Statton
> Now that I have the earlier snippet working (and thank you to all who > helped), I am working on shuffling my array. Basically, the array is > a list of names in the order they will receive a job assignment. > Every third week, I want to shuffle the order. I have tested the > basics of shuffl

A second beginner's question

2005-01-14 Thread Doug Essinger-Hileman
Now that I have the earlier snippet working (and thank you to all who helped), I am working on shuffling my array. Basically, the array is a list of names in the order they will receive a job assignment. Every third week, I want to shuffle the order. I have tested the basics of shuffling the ar

Re: fork() function in perl - a beginner's question

2004-07-15 Thread Gunnar Hjalmarsson
Gowthaman Ramasamy wrote: I have a lengthy Perl script running on a 4 processor machine. At one point of time i have to execute four shell commands / mysql quries from four different batch files. Currently i run them one after other. Can i use fork at this place so that i can fire all 4 mysql qurie

fork() function in perl - a beginner's question

2004-07-15 Thread gowthaman ramasamy
Hello list, Could any one tell me a nice tutorial to learn about fork()ing in perl. I want to accomplish following task with fork function. But i am not sure this can be done with fork()? I have a lengthy Perl script running on a 4 processor machine. At one point of time i have to execute four sh

Re: real beginner's question (s|{(.*?)}|$1=~ tr///|xg)

2002-07-08 Thread Kevin Pfeiffer
Marco Antonio Valenzuela Escárcega writes: > On Mon, 2002-07-08 at 14:03, Kevin Pfeiffer wrote: [...] > > I tried a sort of nested expression similar to what you show > > > > $string =~ s|{(.*?)}|{$1 =~ tr/iw/JX/)}|xg; > > > > It's supposed to capture the text between curly brackets and then do a

Re: a real beginner's question, pt. 2

2002-07-08 Thread Marco Antonio Valenzuela Escárcega
if what you are trying to do is change 'M' for the string 'U+1E43' you can try using a hash: %table = ( M => 'U+1E43'); # or maybe ( M => "\x{1E43}") $string =~ s< {(.*?)} > < '{'.(join '', map { $table{$_} || $_ } split //, $1).'}'; >exg; or you

Fw: a real beginner's question, pt. 2

2002-07-08 Thread Connie Chan
uot;P") ; # Somthing like that, use your way to # mask them. return $ret; } $string = '{N}EVER G{O}ES {M}AD, {P}LEASE!!!'; $string =~ s/\{(.)\}/&maskIt($1)/eg; print $string; Rgds, Connie - Original Message - From: "David Carpenter" <[EMAIL PROTECTED]

a real beginner's question, pt. 2

2002-07-08 Thread David Carpenter
Thanks to all those who responded to my original post. I posted the clarifcation below as a reply to the original thread, but I think it was lost in the shuffle. I think I failed to make something clear. What I need is to selectively replace only certain characters when they appear in a string w

Re: real beginner's question (s|{(.*?)}|$1=~ tr///|xg)

2002-07-08 Thread bob ackerman
On Monday, July 8, 2002, at 02:03 PM, Kevin Pfeiffer wrote: > bob ackerman writes: > [...] >> so: >> s|{(.*?)}|$1=~ tr///|xg; > > I'm trying to test this myself on a string (rather than $_), but don't > understand how to use tr/// on $1 and then place the result back into the > string (practice

Re: real beginner's question (s|{(.*?)}|$1=~ tr///|xg)

2002-07-08 Thread Marco Antonio Valenzuela Escárcega
On Mon, 2002-07-08 at 14:03, Kevin Pfeiffer wrote: > bob ackerman writes: > [...] > > so: > > s|{(.*?)}|$1=~ tr///|xg; > > I'm trying to test this myself on a string (rather than $_), but don't > understand how to use tr/// on $1 and then place the result back into the > string (practice only).

Re: real beginner's question

2002-07-08 Thread drieux
On Sunday, July 7, 2002, at 07:45 , David Carpenter wrote: > I have a text file with occasional strings enclosed in braces: > kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . > > I would like to use tr/// to modify the characters within the braces, > while > leaving the rest of the file unch

Re: real beginner's question (s|{(.*?)}|$1=~ tr///|xg)

2002-07-08 Thread Kevin Pfeiffer
bob ackerman writes: [...] > so: > s|{(.*?)}|$1=~ tr///|xg; I'm trying to test this myself on a string (rather than $_), but don't understand how to use tr/// on $1 and then place the result back into the string (practice only). I tried a sort of nested expression similar to what you show $st

Re: real beginner's question

2002-07-08 Thread David Carpenter
Thanks to all those who have offered their help. I think I failed to make something clear. John's script below replaces everything within the brackets. What I need is to selectively replace only certain characters when they appear in a string within brackets. So if I have: Don't Match the cap

RE: real beginner's question

2002-07-08 Thread Janek Schleicher
T. B. Booher wrote at Mon, 08 Jul 2002 13:53:36 +0200: > Why do you have *? in "(.*?) # store non-greedy match in $1" ? > > It seems like you would just need (.*) . . . what am I missing? > There's a difference looking to the texts asdjsafdl { ansfnkndsf } ekdsngjnfg { fdksjfsf } In the

RE: real beginner's question

2002-07-08 Thread Kipp, James
> > I have a text file with occasional strings enclosed in braces: > kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . > > I would like to use tr/// to modify the characters within the > braces, while > leaving the rest of the file unchanged. Whlie I'm sure this > is a staight > forward pro

RE: real beginner's question

2002-07-08 Thread T. B. Booher
2:18 AM To: [EMAIL PROTECTED] Subject: Re: real beginner's question David Carpenter wrote: > > This is a list for beginners, right? So perhaps no one will be too annoyed > if I ask what is probably a really stupid question . . . > > I have a text file with occasio

Re: real beginner's question

2002-07-07 Thread John W. Krahn
David Carpenter wrote: > > This is a list for beginners, right? So perhaps no one will be too annoyed > if I ask what is probably a really stupid question . . . > > I have a text file with occasional strings enclosed in braces: > kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . > > I would

Re: real beginner's question

2002-07-07 Thread bob ackerman
On Sunday, July 7, 2002, at 10:03 PM, bob ackerman wrote: > > On Monday, July 8, 2002, at 12:55 AM, Todd Wade wrote: > >> >> "David Carpenter" <[EMAIL PROTECTED]> wrote in message >> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> >>> I have a text file with occasional strings enclosed in brac

Re: real beginner's question

2002-07-07 Thread bob ackerman
On Monday, July 8, 2002, at 12:55 AM, Todd Wade wrote: > > "David Carpenter" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> I have a text file with occasional strings enclosed in braces: >> kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . >> >> I wou

Re: real beginner's question

2002-07-07 Thread Todd Wade
"David Carpenter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a text file with occasional strings enclosed in braces: > kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . > > I would like to use tr/// to modify the characters within the braces, whi

RE: real beginner's question

2002-07-07 Thread John Almberg
ohn # -Original Message- # From: David Carpenter [mailto:[EMAIL PROTECTED]] # Sent: Sunday, July 07, 2002 10:45 PM # To: [EMAIL PROTECTED] # Subject: real beginner's question # # # This is a list for beginners, right? So perhaps no one will be # too annoyed # if I ask what is probably

real beginner's question

2002-07-07 Thread David Carpenter
This is a list for beginners, right? So perhaps no one will be too annoyed if I ask what is probably a really stupid question . . . I have a text file with occasional strings enclosed in braces: kdkdkiwiwdkdkdk {iwidkwidkw} kdkdkdwiwiwkdkdk . . . I would like to use tr/// to modify the characte

RE: Beginner's question

2001-04-29 Thread King, Jason
[EMAIL PROTECTED] writes .. > I am writing a small perl script which is included below. I 've >a problem with this line my $prjstream = `cleartool lsstream -in >@prjname[1]\@$ucmvob | grep Int` ; It doesn't recognise $ucmvob in >this command. But if I replace the variable $ucmvob with the str

Re: Beginner's question

2001-04-27 Thread Johnathan Kupferer
> > #!/usr/local/bin/perl > use strict ; > my $ucmvob = "/ebppvobstore/vobs/UCMCQ" ; > my $PR_NAME = ; > my $vobname = `cleartool lsproject -invob $ucmvob | grep $PR_NAME` ; > my @prjname = split /\s+/, $vobname ; > my $prjstream = `cleartool lsstream -in @prjname[1]\@$ucmvob | grep Int` ; Did

Beginner's question

2001-04-27 Thread Kailash . Subramanian
All, I am writing a small perl script which is included below. I 've a problem with this line my $prjstream = `cleartool lsstream -in @prjname[1]\@$ucmvob | grep Int` ; It doesn't recognise $ucmvob in this command. But if I replace the variable $ucmvob with the string "/ebppvobstore/vobs