Dan Anderson <[EMAIL PROTECTED]> wrote:
:
: Does Perl have any kind of else / unless statements, sort of
: like elsif? I tried:
:
: if ($foo) {
: }
: else unless ($bar) {
: }
What about:
elsif ( ! $bar ) {
}
HTH,
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes,
Does Perl have any kind of else / unless statements, sort of like
elsif? I tried:
if ($foo) {
}
else unless ($bar) {
}
but it just gave me syntax errors. And I guess I could just do:
if ($foo) {
}
else {
unless ($bar) {
}
}
But the place in the code I was trying it was for clarity, and all
[EMAIL PROTECTED] wrote:
> #!/usr/bin/perl -w
> use strict;
> BEGIN{open(STDERR, ">./err.txt")}
> print "Content-Type: text/html\n\n";
> foreach my $key (sort keys %ENV) {
> print "\$ENV{$key} = $ENV{$key}\n";
> }
>
> None of my scripts are functioning on my new server. The BEGIN statement
>
Kyle Sexton wrote:
> I am trying to implement something akin the the perl monger map located
> at http://bath.pm.org/map/. I have got my map to the point that it
> will pull lat/long information from a web server and generate a map.
> What I am looking to do now is implement zooming in on the map
On Sun, 2004-01-11 at 11:47, zentara wrote:
> On Sun, 11 Jan 2004 06:10:32 EST, [EMAIL PROTECTED] wrote:
>
> >#!/usr/bin/perl -w
> >use strict;
> >BEGIN{open(STDERR, ">./err.txt")}
> >print "Content-Type: text/html\n\n";
> >foreach my $key (sort keys %ENV) {
> > print "\$ENV{$key} = $ENV{$key}
Hi list,
1. Does anyone know of a module in CPAN which lets you implement the netstat function
within Perl code? I was expecting to see something like netstat.pm, but a CPAN search
turned up nothing.
2. If there's no such module, why not? Any guesses? It's seems like the kind of
thing that g
On Fri, 2004-01-09 at 16:54, Wiggins d Anconia wrote:
> > > Any suggestions? Thanks for your help and thoughts.
> >
> > It is much easier to define the set all chars must be in then not. Use
> > the =! which is the complement of all charachters matched by =~.
> > Alternatively, I believe there i
[EMAIL PROTECTED] wrote:
>
> #!/usr/bin/perl -w
> use strict;
> BEGIN{open(STDERR, ">./err.txt")}
> print "Content-Type: text/html\n\n";
> foreach my $key (sort keys %ENV) {
> print "\$ENV{$key} = $ENV{$key}\n";
> }
>
> None of my scripts are functioning on my new server. The BEGIN
> statemen
Mallik wrote:
>
> I have to compare numeric values as below
>
> if (($segsep == 13) || ($segsep == 10) || ($segsep == 0))
>
> Can I use the reg exp as below
>
> if ($segsep =~ /^(13|10|0)$/)
>
> My question is, is it adviceable to use reg exp for numeric values (entire
> value).
> If yes, why?
> If
#!/usr/bin/perl -w
use strict;
BEGIN{open(STDERR, ">./err.txt")}
print "Content-Type: text/html\n\n";
foreach my $key (sort keys %ENV) {
print "\$ENV{$key} = $ENV{$key}\n";
}
None of my scripts are functioning on my new server. The BEGIN statement
doesn't write err.txt
But it does function
Dear Friends,
I have to compare numeric values as below
if (($segsep == 13) || ($segsep == 10) || ($segsep == 0))
Can I use the reg exp as below
if ($segsep =~ /^(13|10|0)$/)
My question is, is it adviceable to use reg exp for numeric values (entire
value).
If yes, why?
If not, why?
Thank you
11 matches
Mail list logo