Hi,
I'm creating a hash like this:
%h = (a => 1, b => 2);
I want to also be able to define a key 'c' in terms of value in a and b.
I can do it in two lines:
%h = (a => 1, b => 2);
$h{c} = $h{a} + $h{b};
Is there any way to do this when creating the hash?
%h = (a => 1, b => 2, c => a + b)
I've
I have used:
if(0) {
BLOCK OF CODE
}
or
=item comment
BLOCK OF CODE
=cut
--Paul
> -Original Message-
> From: SAWMaster [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 3:44 PM
> To: [EMAIL PROTECTED]
> Subject: Commenting.
>
>
> Is there a way to "block comment" in P
Try the perlvar documentation:
perldoc perlvar
--Paul
> -Original Message-
> From: Gary L. Armstrong [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 19, 2001 12:18 PM
> To: 'Beginners@Perl. Org'; José A. Ferrer
> Subject: RE: Very newbie question
>
>
> I have been using the indexes
Hi,
> open(CONF, "/opt/disk4/REDBACK-BACKUP/$s") or die("configuration file not
found")";
^
Try getting rid of the extra " on line 7.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
The following if checks for variable between -10 and 10.
if ( $variable > -10 and $variable < 10 ) {
# do something
}
The example you gave looks like it always executes though, so maybe I'm
missing something.
--Paul
> -Original Message-
> From: Mark Martin [mailto:[EMAIL