[23780] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5984 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 27 18:05:38 2003

Date: Sat, 27 Dec 2003 15:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 27 Dec 2003     Volume: 10 Number: 5984

Today's topics:
        A Challenge... <nil@email.com>
    Re: A Challenge... <ndronen@io.frii.com>
    Re: A Challenge... <nil@email.com>
    Re: A Challenge... <ndronen@io.frii.com>
    Re: A Challenge... <nil@email.com>
    Re: A Challenge... <gnari@simnet.is>
    Re: A Challenge... <nil@email.com>
    Re: A Challenge... <qumsieh@cim.mcgill.ca>
    Re: A Challenge... <qumsieh@cim.mcgill.ca>
    Re: A Challenge... <gnari@simnet.is>
    Re: A Challenge... (Jay Tilton)
    Re: A Challenge... <gnari@simnet.is>
    Re: A Challenge... <gnari@simnet.is>
    Re: I don't know what's wrong here ! (Tad McClellan)
    Re: I don't know what's wrong here ! (Tad McClellan)
    Re: I don't know what's wrong here ! <noreply@gunnar.cc>
    Re: I don't know what's wrong here ! <groleau@freeshell.org>
    Re: I don't know what's wrong here ! <groleau@freeshell.org>
    Re: I don't know what's wrong here ! <gnari@simnet.is>
    Re: matching balanced parens <usenet@morrow.me.uk>
    Re: Newbie problems with > in a string <go@away.spam>
    Re: Newbie problems with > in a string <go@away.spam>
        ObjectA calling ObjectB (Midas)
    Re: ObjectA calling ObjectB (Midas)
    Re: Problem with email  (Tad McClellan)
    Re: Problem with email  <nil@email.com>
    Re: Problem with email  <nil@email.com>
    Re: Why does Perl use more resource than Php? <usenet@morrow.me.uk>
    Re: Why does Perl use more resource than Php? <noreply@gunnar.cc>
    Re: why this code shots up memory usage (Tad McClellan)
    Re: why this code shots up memory usage <usenet@morrow.me.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 28 Dec 2003 01:09:26 +0800
From: "someone" <nil@email.com>
Subject: A Challenge...
Message-Id: <3fed5b17$1@news.starhub.net.sg>

Hi all,
    here is a challenge for all of ya...

http://m_12321.tripod.com/c.htm




------------------------------

Date: 27 Dec 2003 17:37:00 GMT
From: Nicholas Dronen <ndronen@io.frii.com>
Subject: Re: A Challenge...
Message-Id: <3fedc33c$0$200$75868355@news.frii.net>

someone <nil@email.com> wrote:
s> Hi all,
s>     here is a challenge for all of ya...

s> http://m_12321.tripod.com/c.htm

$ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x ((20-length $x)/2), $x }'

Regards,

Nicholas

-- 
"Why shouldn't I top-post?"    http://www.aglami.com/tpfaq.html
"Meanings are another story."  http://www.ifas.org/wa/glossolalia.html


------------------------------

Date: Sun, 28 Dec 2003 01:43:47 +0800
From: "someone" <nil@email.com>
Subject: Re: A Challenge...
Message-Id: <3fed6324$1@news.starhub.net.sg>

sorry, forgot something -- you dont have to add in the command line, just
the code will do.




------------------------------

Date: 27 Dec 2003 17:46:09 GMT
From: Nicholas Dronen <ndronen@io.frii.com>
Subject: Re: A Challenge...
Message-Id: <3fedc561$0$204$75868355@news.frii.net>

someone <nil@email.com> wrote:
s> sorry, forgot something -- you dont have to add in the command line, just
s> the code will do.

Run with perl -wl. :-)

for (reverse 0..9) {
	$x=$x?"$_$x$_":$_;
	print " " x ((20-length $x)/2), $x;
}

Regards,

Nicholas

-- 
"Why shouldn't I top-post?"    http://www.aglami.com/tpfaq.html
"Meanings are another story."  http://www.ifas.org/wa/glossolalia.html


------------------------------

Date: Sun, 28 Dec 2003 01:59:24 +0800
From: "someone" <nil@email.com>
Subject: Re: A Challenge...
Message-Id: <3fed66d3@news.starhub.net.sg>

nice try... but im sorry that isn't the shortest.




------------------------------

Date: Sat, 27 Dec 2003 17:59:38 -0000
From: "Ragnar Hafstaš" <gnari@simnet.is>
Subject: Re: A Challenge...
Message-Id: <bskhb2$j5u$1@news.simnet.is>

"Nicholas Dronen" <ndronen@io.frii.com> wrote in message
news:3fedc33c$0$200$75868355@news.frii.net...
> someone <nil@email.com> wrote:
> s> Hi all,
> s>     here is a challenge for all of ya...
>
> s> http://m_12321.tripod.com/c.htm
>
> $ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x
((20-length $x)/2), $x }'

trivial improvement (untested):
$ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x $_, $x }'

gnari






------------------------------

Date: Sun, 28 Dec 2003 02:21:52 +0800
From: "someone" <nil@email.com>
Subject: Re: A Challenge...
Message-Id: <3fed6c1c@news.starhub.net.sg>

you're getting there. :-)




------------------------------

Date: Sat, 27 Dec 2003 19:04:41 GMT
From: Ala Qumsieh <qumsieh@cim.mcgill.ca>
Subject: Re: A Challenge...
Message-Id: <dJkHb.2775$kb5.324@newssvr25.news.prodigy.com>

Ragnar Hafstaš wrote:
> "Nicholas Dronen" <ndronen@io.frii.com> wrote in message
> news:3fedc33c$0$200$75868355@news.frii.net...
> 
>>someone <nil@email.com> wrote:
>>s> Hi all,
>>s>     here is a challenge for all of ya...
>>
>>s> http://m_12321.tripod.com/c.htm
>>
>>$ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x
> 
> ((20-length $x)/2), $x }'
> 
> trivial improvement (untested):
> $ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x $_, $x }'

More trivial improvements:

perl -le map{print$"x$_,$x=$x?"$_$x$_":$_}reverse 0..9

--Ala



------------------------------

Date: Sat, 27 Dec 2003 19:10:49 GMT
From: Ala Qumsieh <qumsieh@cim.mcgill.ca>
Subject: Re: A Challenge...
Message-Id: <ZOkHb.2777$le5.865@newssvr25.news.prodigy.com>

Ala Qumsieh wrote:

> perl -le map{print$"x$_,$x=$x?"$_$x$_":$_}reverse 0..9

Hmmm .. reverse() is such a long-named function.

perl -le map{print$"x-$_,$x=$x?-$_.$x.-$_:-$_}-9..0

--Ala



------------------------------

Date: Sat, 27 Dec 2003 19:58:00 -0000
From: "Ragnar Hafstaš" <gnari@simnet.is>
Subject: Re: A Challenge...
Message-Id: <bsko90$jed$1@news.simnet.is>


"Ala Qumsieh" <qumsieh@cim.mcgill.ca> wrote in message
news:ZOkHb.2777$le5.865@newssvr25.news.prodigy.com...
> Ala Qumsieh wrote:
>
> > perl -le map{print$"x$_,$x=$x?"$_$x$_":$_}reverse 0..9
>
> Hmmm .. reverse() is such a long-named function.
>
> perl -le map{print$"x-$_,$x=$x?-$_.$x.-$_:-$_}-9..0

actually, this does not work as typed.
it does with quotes:
perl -le'map{print$"x-$_,$x=$x?-$_.$x.-$_:-$_}-9..0'

but then this is better:
perl -le 'print$"x-$_,$x=$x?-$_.$x.-$_:-$_ for-9..0'


gnari






------------------------------

Date: Sat, 27 Dec 2003 20:34:38 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: A Challenge...
Message-Id: <3fede596.669241333@news.erols.com>

"Ragnar Hafstaš" <gnari@simnet.is> wrote:

: "Nicholas Dronen" <ndronen@io.frii.com> wrote in message
: news:3fedc33c$0$200$75868355@news.frii.net...
: > someone <nil@email.com> wrote:
: > s> Hi all,
: > s>     here is a challenge for all of ya...
: >
: > s> http://m_12321.tripod.com/c.htm
: >
: > $ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x
: ((20-length $x)/2), $x }'
: 
: trivial improvement (untested):
: $ perl -wle 'for (reverse 0..9) { $x=$x?"$_$x$_":$_; print " " x $_, $x }'
          ^
----------^
Warnings have no benefit in golf, and scoring usually counts the switches
as strokes.

Same basic idea, more improvement:

    perl -le '$;=10;print$"x$;,$x=$x?"$;$x$;":$;while$;--'

Ditching the ?: operator in favor of s///:

    perl -le '$i=10;s/^|$/$i/g,print$"x$i,$_ while$i--'



------------------------------

Date: Sat, 27 Dec 2003 20:04:12 -0000
From: "Ragnar Hafstaš" <gnari@simnet.is>
Subject: Re: A Challenge...
Message-Id: <bskokk$jh8$1@news.simnet.is>

"Ragnar Hafstaš" <gnari@simnet.is> wrote in message
news:bsko90$jed$1@news.simnet.is...
>
> "Ala Qumsieh" <qumsieh@cim.mcgill.ca> wrote in message
> news:ZOkHb.2777$le5.865@newssvr25.news.prodigy.com...
> > Ala Qumsieh wrote:
> >
> > > perl -le map{print$"x$_,$x=$x?"$_$x$_":$_}reverse 0..9
> >
> > Hmmm .. reverse() is such a long-named function.
> >
> > perl -le map{print$"x-$_,$x=$x?-$_.$x.-$_:-$_}-9..0
>
> actually, this does not work as typed.
> it does with quotes:
> perl -le'map{print$"x-$_,$x=$x?-$_.$x.-$_:-$_}-9..0'
>
> but then this is better:
> perl -le 'print$"x-$_,$x=$x?-$_.$x.-$_:-$_ for-9..0'

and even better:
perl -le'print$"x-$_,$x=$x?-$_.$x.-$_:9 for-9..0'





------------------------------

Date: Sat, 27 Dec 2003 20:07:24 -0000
From: "Ragnar Hafstaš" <gnari@simnet.is>
Subject: Re: A Challenge...
Message-Id: <bskoqj$jhi$1@news.simnet.is>


"Ragnar Hafstaš" <gnari@simnet.is> wrote in message
news:bskokk$jh8$1@news.simnet.is...
> and even better:
> perl -le'print$"x-$_,$x=$x?-$_.$x.-$_:9 for-9..0'

one more character:
perl -le'print$"x-$_,$x=$x?-$_.$x.-$_:9for-9..0'

gnari





------------------------------

Date: Sat, 27 Dec 2003 10:00:39 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: I don't know what's wrong here !
Message-Id: <slrnburb57.ff4.tadmc@magna.augustmail.com>

Wes Groleau <groleau@freeshell.org> wrote:
> John W. Krahn wrote:
>> Do you really need to slurp the entire input into an array?
> 
> Not really.  I have used foreach (<>) before


Don't do that, do:

   while ( <> )

instead.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 27 Dec 2003 10:02:06 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: I don't know what's wrong here !
Message-Id: <slrnburb7u.ff4.tadmc@magna.augustmail.com>

Wes Groleau <groleau@freeshell.org> wrote:
> Jay Tilton wrote:


>> The values in $1, $2, etc. are not reset when a match fails,


> But I will have to explicitly undefine them each time.


No you won't.

You will have to ensure that the match _succeeds_ before you
make use of the dollar-digit (capture) variables.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 27 Dec 2003 17:59:58 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: I don't know what's wrong here !
Message-Id: <bske19$dnca9$1@ID-184292.news.uni-berlin.de>

Wes Groleau wrote:
> Isn't "undef" a predefined 'constant' that can be assigned to a
> variable?

Yes, it is. But as regards those special $1, $2, etc. variables, you
cannot assign anything to them. They are populated only through regex
capturing.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Sat, 27 Dec 2003 12:19:36 -0500
From: Wes Groleau <groleau@freeshell.org>
Subject: Re: I don't know what's wrong here !
Message-Id: <ZaednaicF9W1InCiRVn-vg@gbronline.com>

Thank you all.  I implemented most of the suggestions,
and it now works on correct input.  Some of the error
handling of incorrect input is faulty, but I'll study
that a little more before I beg for advice again.  :-)

Still don't know why it quit.
Seems like the biggest problem was in the regexp, yet
I'm sure I didn't touch that line since the last time
it worked.   :-)

Thanks again!

-- 
Wes Groleau
Alive and Well
http://freepages.religions.rootsweb.com/~wgroleau/



------------------------------

Date: Sat, 27 Dec 2003 12:32:56 -0500
From: Wes Groleau <groleau@freeshell.org>
Subject: Re: I don't know what's wrong here !
Message-Id: <49adnY9vzKXVX3Ci4p2dnA@gbronline.com>

To give credit where credit is due....

I put this in the header:

# (And lots of help from Ragnar Hafsta___, Gunnar Hjalmarsson,
# John Krahn, Jay Tilton, on comp.lang.perl.misc)

but Mozilla (or possibly the sending client or
an NNTP server in between) screws up non-ASCII
characters.  So Ragnar, can you describe the missing
characters for me?  Or if any of you prefer to remain
unmentioned, please tell me.

-- 
Wes Groleau
   "To know what you prefer, instead of humbly saying
    Amen to what the world tells you you should prefer,
    is to have kept your soul alive."
                          -- Robert Louis Stevenson



------------------------------

Date: Sat, 27 Dec 2003 17:56:08 -0000
From: "Ragnar Hafstaš" <gnari@simnet.is>
Subject: Re: I don't know what's wrong here !
Message-Id: <bskh4h$j55$1@news.simnet.is>

"Wes Groleau" <groleau@freeshell.org> wrote in message
news:49adnY9vzKXVX3Ci4p2dnA@gbronline.com...
> To give credit where credit is due....
>
> I put this in the header:
>
> # (And lots of help from Ragnar Hafsta___, Gunnar Hjalmarsson,
> # John Krahn, Jay Tilton, on comp.lang.perl.misc)
>
> but Mozilla (or possibly the sending client or
> an NNTP server in between) screws up non-ASCII
> characters.  So Ragnar, can you describe the missing
> characters for me?  Or if any of you prefer to remain
> unmentioned, please tell me.

one character:
 ISO-8859-1 code 240
or HTML entity &#240; or &eth;
or unicode LATIN SMALL LETTER ETH

you can use 'd' if it gives you trouble

gnari





------------------------------

Date: Sat, 27 Dec 2003 18:32:11 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: matching balanced parens
Message-Id: <bskj7b$t3t$3@wisteria.csv.warwick.ac.uk>


ivo.welch@anderson.ucla.edu (ivo welch) wrote:
> I have tried for a while to figure out how to use the experimental
> perl regex balanced paren feature (perlfaq6), but failed.  if this is
> possible, could someone please give me an example of the magic
> invokation?

Use Text::Balanced from CPAN.

Ben

-- 
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based 
on the strictest morality.  [Samuel Butler, paraphrased]       ben@morrow.me.uk


------------------------------

Date: Sat, 27 Dec 2003 23:35:28 -0500
From: "LaDainian Tomlinson" <go@away.spam>
Subject: Re: Newbie problems with > in a string
Message-Id: <kriHb.5333$6l1.1318@okepread03>

"Albert Browne" wrote:

<snip>

> $title = $query->param("Title");
>
> if ($title ne "") {$Meta = "<META NAME=\"AUTHOR\" CONTENT=\"$title\">\n"}
;
>
> $Owner = $query->param("Owner");
>
> if ($Author ne "") {$Meta .= "<META NAME=\"AUTHOR\"
CONTENT=\"$Owner\">\n"};
      ^^^^^^^

Was that supposed to be $Owner?  If you

use strict;

it'll warn you about those.

Brandan L.
-- 
bclennox AT eos DOT ncsu DOT edu




------------------------------

Date: Sat, 27 Dec 2003 23:43:14 -0500
From: "LaDainian Tomlinson" <go@away.spam>
Subject: Re: Newbie problems with > in a string
Message-Id: <yyiHb.5345$6l1.966@okepread03>

"LaDainian Tomlinson" wrote:

<snip>

> > if ($Author ne "") {$Meta .= "<META NAME=\"AUTHOR\"
> CONTENT=\"$Owner\">\n"};
>       ^^^^^^^

Yes, that's supposed to be pointing to $Author.  I suppose that if you

use Shoddy::Products qw/Microsoft/;

you can expect things to go wrong.

Brandan L.
-- 
bclennox AT eos DOT ncsu DOT edu




------------------------------

Date: Sat, 27 Dec 2003 19:15:01 GMT
From: MidasOneTwo@hotmail.nospam.com (Midas)
Subject: ObjectA calling ObjectB
Message-Id: <3fedda24.46652621@news.iprimus.ca>

In my "main" code, I would like to create two
new objects (ObjectA and ObjectB) and have
ObjectA directly call an ObjectB method. In
order to do this I believe ObjectA must hold
a reference to ObjectB. What about the name
of the method? Must it be hardcoded in
ObjectA?


------------------------------

Date: Sat, 27 Dec 2003 21:39:20 GMT
From: MidasOneTwo@hotmail.nospam.com (Midas)
Subject: Re: ObjectA calling ObjectB
Message-Id: <3fedfbe3.55292471@news.iprimus.ca>

In other words, I'd like ObjectA to be *told*, at run time, which object to call and which method to call.


------------------------------

Date: Sat, 27 Dec 2003 10:17:20 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Problem with email 
Message-Id: <slrnburc4g.ff4.tadmc@magna.augustmail.com>

Ning li <ningli2000@worldnet.att.net> wrote:

>    Thanks in advance for your help.

>  The code is as the follow:
> 
>   #!/usr/local/bin/perl


Show your real code (shebangs do not work when indented).

Enable warnings.

Enable strict.

Use CGI.pm to parse form values.

Check the return value from open().

Check the return value from close() if the open() used a pipe.

Then post the de-crufted version of your code.


>     foreach $key (sort keys %$hashReference)
>     {
>       print MAIL "To: jsmith\@hotmail.com\n";
>       print MAIL "From: Operations\@tools.com\n";
>       print MAIL "Subject: ";
>       print MAIL "Information Request\n\n";
>       print MAIL "Here is the message\n");
>     }


You do not use $key anywhere in the loop. Why not?

Why must the keys be sorted?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sun, 28 Dec 2003 01:39:42 +0800
From: "someone" <nil@email.com>
Subject: Re: Problem with email 
Message-Id: <3fed622d$1@news.starhub.net.sg>

>     foreach $key (sort keys %$hashReference)
>     {
>       print MAIL "To: jsmith\@hotmail.com\n";
>       print MAIL "From: Operations\@tools.com\n";
>       print MAIL "Subject: ";
>       print MAIL "Information Request\n\n";
>       print MAIL "Here is the message\n");
>     }

I suspect that the above loop doesn't execute at all.
therefore, no data is fed to the sendmail program.
check out the values of your $my_citycode and %$hashReference.




------------------------------

Date: Sun, 28 Dec 2003 01:42:28 +0800
From: "someone" <nil@email.com>
Subject: Re: Problem with email 
Message-Id: <3fed62dd@news.starhub.net.sg>

$my_citycode = check_citycode();


sub check_citycode
{
  my ($hashReference) = @_;
  my $citycode = "";

  foreach $key (sort keys %$hashReference)
  {
    if ($key eq "CityCode" && ($$hashReference{$key} eq "NY"))
    {
      $citycode = 'NY';


As shown above, you did *not* pass anything to the sub check_citycode.
therefore, $my_citycode has an undefined value. and nothing is done in the
sub mailComment.




------------------------------

Date: Sat, 27 Dec 2003 18:11:24 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Why does Perl use more resource than Php?
Message-Id: <bski0c$t3t$1@wisteria.csv.warwick.ac.uk>


Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Now i'm confused. If you don't run your Perl program under mod_perl or
> something similar, it's compiled every time it's called. The
> compilation costs CPU. (Please correct me if I'm wrong so far.)

This is not specific to Perl, it applies ti any 'scripting'-type
language which is not precompiled. For instance, if you don't run your
PHP program under mod_php or similar, it's compiled (or re-parsed, or
whatever PHP does) every time.

> Of course. But you can't do anything about the need to compile.

You can do many things: use mod_perl or fastCGI, compile to bytecode,
write a separate server process that does most of the processing,
write the program so as not to load modules unless they're needed...

> Erik Tank wrote:
> > Asking if Perl is slower or uses more resources that PHP is like 
> > asking if a Ford gets better gas mileage than a Toyota.
> 
> The question in the subject line of this thread may not be possible to
> answer. But for a particular application area I really thought is was
> not only possible, but also advisable, to consider which programming
> language is the better choice out from various viewpoints - also CPU
> usage. If you guys disagree on that, I must have missed something.

You are of course right in both cases :). In general, the question is
unanswerable, except for generalities like 'well-written C tends to be
faster' and 'Lisps tend to be slow'. In specific cases, language may
make a difference: in particular, if your ISP provides mod_php and not
mod_perl you should either switch ISP or use PHP. :)

Ben

-- 
And if you wanna make sense / Whatcha looking at me for?          (Fiona Apple)
                            * ben@morrow.me.uk *


------------------------------

Date: Sat, 27 Dec 2003 22:06:23 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Why does Perl use more resource than Php?
Message-Id: <bsksfu$e23mo$1@ID-184292.news.uni-berlin.de>

Ben Morrow wrote:
> if your ISP provides mod_php and not mod_perl you should either
> switch ISP or use PHP. :)

Well, my impression is that web hosting providers tend to offer
mod_php, while web apps written in Perl typically are reduced to CGI.
That is probably a generally valid answer to the question in the
subject line, btw.

Following your advice would lead to Perl being marginalized (is that a
word?) as a language for web apps. :(

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



------------------------------

Date: Sat, 27 Dec 2003 10:08:22 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: why this code shots up memory usage
Message-Id: <slrnburbjm.ff4.tadmc@magna.augustmail.com>

Madhur <a_madhur@vsnl.net> wrote:

> for (@result){ print;}

> As far as I know, for loop requires 3 arguments, and even if one
> argument is given, the 2 semicolons must be there.
> I have checked my book and the perl docs but haven't found the
> reference about this.


   perldoc perlsyn

      The C<foreach> keyword is actually a synonym for the C<for> 
      keyword, so you can use C<foreach> for readability or C<for> 
      for brevity.




[ Snip TOFU.
  Please learn how to properly quote followups.
  Soon.
]

-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 27 Dec 2003 18:25:49 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: why this code shots up memory usage
Message-Id: <bskird$t3t$2@wisteria.csv.warwick.ac.uk>


Michele Dondi <bik.mido@tiscalinet.it> wrote:
> On Fri, 26 Dec 2003 10:45:08 +0530, "Madhur" <a_madhur@vsnl.net>
> wrote:
> 
> >Indeed I agree, I won't never use them in future.
> 
> "You will never" or "you won't ever"...
> ;-)

There en't nuffin' wrong wi' dobble negitives.. ;)

Ben

-- 
If I were a butterfly I'd live for a day, / I would be free, just blowing away.
This cruel country has driven me down / Teased me and lied, teased me and lied.
I've only sad stories to tell to this town: / My dreams have withered and died.
  ben@morrow.me.uk   <=>=<=>=<=>=<=>=<=>=<=>=<=>=<=>=<=>=<=>=<=>   (Kate Rusby)


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 5984
***************************************


home help back first fref pref prev next nref lref last post