Kay Bieri wrote at Sun, 28 Jul 2002 13:21:44 +0200:
> 1.) First of all, I'm unhappy with the '~' I had to plug in so $funcs{$func}~[$1]
>would not be
> considered as a ref to an array. Is there a better way to stop Perl from
>misinterpreting this? I
> need the []-braces since arguments to funct
On Jul 28, Balint, Jess said:
>Hello all. I am getting an error with the following reg-exp:
>
> s/\$\{(\w+)\}/$$1/g;
>
>I am not sure exactly how to do this type of thing. Is there any way to get
>around the error or must I turn off 'strict refs' for this line?? Thanks
>alot.
If you're try
Jess,
Try:
s/\$\{(\w+)\}/\$${1}/g;
if i understood your problem correctly =)
- John
On Sun, 28 Jul 2002, Balint, Jess wrote:
> Hello all. I am getting an error with the following reg-exp:
>
> s/\$\{(\w+)\}/$$1/g;
>
> I am not sure exactly how to
At 06:51 PM 7/28/2002, you wrote:
>Tara,
> Try this:
> foreach $elemenet(@fooarray){
> if($element eq $foo){
> things_happen;
> }
> }
> - John
Thanks John a
Just to throw in one more way to do it with a sub:
### MAIN #
my $name = "Tim";
my @names = qw(Peter Paul Mary);
if( MatchAny($name,\@names) ){
print "It's in there!\n";
}else{
print "Go fish.\n";
}
### SUBS #
sub MatchAny{
my( $search
"Balint, Jess" <[EMAIL PROTECTED]> writes:
> Hello all. I am getting an error with the following reg-exp:
>
> s/\$\{(\w+)\}/$$1/g;
>
> I am not sure exactly how to do this type of thing. Is there any way to get
> around the error or must I turn off 'strict refs' for this line?? Thanks
> a
Hello all. I am getting an error with the following reg-exp:
s/\$\{(\w+)\}/$$1/g;
I am not sure exactly how to do this type of thing. Is there any way to get
around the error or must I turn off 'strict refs' for this line?? Thanks
alot.
Jess
--
To unsubscribe, e-mail: [EMAIL PROTECTED
~/.cpan/CPAN/MyConfig.pm??
Should be a backup named "MyConfig.pm~" if you need it.
http://danconia.org
Scott Wahlstrom wrote:
> Upon running
>
> #nada> perl -MCPAN -e shell
>
> a configuration file was changed...whats the name of this file?
>
> ThanX
>
>
--
To unsubscribe, e-mail: [EM
Tin-Shan Chau wrote:
>
> I have run into the following problem with UNPACK:
Did you try the code I posted on Thursday?
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Tara,
Try this:
foreach $elemenet(@fooarray){
if($element eq $foo){
things_happen;
}
}
- John
On Sun, 28 Jul 2002, Tara Calishain wrote:
> Gentle Perl peo
From: Tara Calishain <[EMAIL PROTECTED]>
> I know you can compare two variables:
>
> if ($foo eq $otherfoo) {things happen}
>
> What I want to know is if you can do something that compares a
> variable to every element in an array. For example, would something
> like
>
> if ($foo eq @fooarray)
Gentle Perl people,
Sorry to bother you with this, but I can't find the answer in my Pile of
Perl Books.
I probably don't know enough to ask the question correctly.
I know you can compare two variables:
if ($foo eq $otherfoo) {things happen}
What I want to know is if you can do something that
I have run into the following problem with UNPACK: If I concatenate the packed values
of a list to a string, when I use the unpack operation to put the values back into an
array, the last element is missing. I can only get around the problem by specifying
the exact number of elements to unpac
Upon running
#nada> perl -MCPAN -e shell
a configuration file was changed...whats the name of this file?
ThanX
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The one other thing that PPM does besides copy the files is to note the
changes in an XML file so that it "knows" which modules have been installed.
For this reason PPM will not be aware of any modules that you have installed
manually, adn it will not be aware of any changes that you make, such
Hi,
I'm pretty new to perl, but I think this may help:
I believe a good 'rule of thumb' test can be "can that 'whole area that I think may be
an expression' be used as having some type of value?"
The reason '$x = $y + 2' is an expression is because you can legally (although almost
never done
"David T-G" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>Sorry for the interruption, everyone.
>
>Chris, your email address (@home.com) is dead. Would you mind fixing it?
Since you are asking people to change thier user agent's configuration, how
about chai
Paul Tremblay wrote at Sun, 28 Jul 2002 03:38:56 +0200:
> I don't understand this syntax:
>
>
>> s[([&<>]|(?<=\\)$rx)][$rep{$1}]go;
> ^^^
>
> Is that another way of telling the regex that you don't want to save the value?
It a zero-width positive look-behind assertion.
It says
Connie Chan wrote at Sat, 27 Jul 2002 15:15:03 +0200:
> With this, I'll have a question again =)
> how about : for (my $x = 0; $x <= 100; $x++){} ?
> In every loop, $x return the value to the middle,
> and the middle design to roll another loop or not. It is doing something similar to
>if then e
Hello all
I sometimes need to convert mathematical expressions from maple to
mathematica in order to compare my results with somebody else's. There are
simple functions like 'cos(arg)' which must be convertet to 'Cos[arg]' and
a little more involved ones like 'dilog(arg)' which goes to
'PolyLog[2
20 matches
Mail list logo