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
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
> 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
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
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
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
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
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
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]
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
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
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).
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
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
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
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
>
> 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
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
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
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
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
"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
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
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
[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
>
> #!/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
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
27 matches
Mail list logo