[31340] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2585 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 5 21:09:43 2009

Date: Sat, 5 Sep 2009 18:09:10 -0700 (PDT)
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, 5 Sep 2009     Volume: 11 Number: 2585

Today's topics:
    Re: Another way of resizing an Image? <Peter@PSDT.com>
    Re: Another way of resizing an Image? <cartercc@gmail.com>
    Re: Another way of resizing an Image? <jurgenex@hotmail.com>
    Re: Another way of resizing an Image? <hjp-usenet2@hjp.at>
        copy specific lines <fgnowfg@gmail.com>
    Re: copy specific lines <jurgenex@hotmail.com>
    Re: create a form with cgi and a multidimensional array sln@netherlands.com
        FAQ 1.3 Which version of Perl should I use? <brian@theperlreview.com>
        FAQ 3.2 How can I use Perl interactively? <brian@theperlreview.com>
        FAQ 3.23 Can I write useful Perl programs on the comman <brian@theperlreview.com>
        Mediterranean Diet Could Eliminate Prescriptions for Ne <asim.ssat@gmail.com>
    Re: need help, will pay (Jens Thoms Toerring)
        Padre greymausg@mail.com
    Re: Padre <bart.lateur@pandora.be>
    Re: Padre greymausg@mail.com
    Re: Padre greymausg@mail.com
        Why does "$v = @ARGV[0]" work ? <rlfoster1@cox.net>
    Re: Why does "$v = @ARGV[0]" work ? <peter@makholm.net>
    Re: Why does "$v = @ARGV[0]" work ? <spamtrap@piven.net>
    Re: Why does "$v = @ARGV[0]" work ? <ben@morrow.me.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 05 Sep 2009 11:49:58 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Another way of resizing an Image?
Message-Id: <Gfsom.19631$u76.3513@newsfe10.iad>

On Wed, 26 Aug 2009 20:28:34 +0100, Graham wrote:
>  the line
>     open my $fh, ">:raw", $fn or print "Error with '$fname': $!";
> didn't work
> but a similar line
>    open (FH, ">:raw", $fname) or print "Error with '$fname': $!";
> did work!
> 
> I must admit I don't particularly understand why

If you put

use strict;
use warnings;

in every script, you would.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274


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

Date: Sat, 5 Sep 2009 06:58:40 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Another way of resizing an Image?
Message-Id: <8ce1f400-bf50-404d-9a4f-1b145804e206@r5g2000yqi.googlegroups.com>

On Aug 25, 12:29=A0pm, "Graham" <graham.s...@stowassocs.co.uk> wrote:
> Actually, that's the perfect answer! I now know that the guy who's taking
> the images can only take them 2592 x 1944 - far too big to sensibly uploa=
d
> to the server anyway. So I'll write a script that will resize them to 800=
 x
> 600 on my machine and also create 160 x 120 thumbs too, then upload the l=
ot
> to the server. Job done!

I'm starting a project (a web app) that will require thumbnails of a
fairly large number of JPGs that are already accessible over a web
server.

Would it be better to write a script to make all the thumbnails at
once and store them in the database along with the full size pics?

Or would it be better to create the thumbnail dynamically when it's
requested? We don't anticipate much traffic for this.

CC.



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

Date: Sat, 05 Sep 2009 07:22:54 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Another way of resizing an Image?
Message-Id: <6tr4a5lemntol4emddldu7dvno9v5i2haq@4ax.com>

ccc31807 <cartercc@gmail.com> wrote:
>I'm starting a project (a web app) that will require thumbnails of a
>fairly large number of JPGs that are already accessible over a web
>server.
>
>Would it be better to write a script to make all the thumbnails at
>once and store them in the database along with the full size pics?
>
>Or would it be better to create the thumbnail dynamically when it's
>requested? We don't anticipate much traffic for this.

Only you can answer that question, particular only you know what
criteria are relevant for you to judge one solution to be "better" than
the other:
- disk space used
- CPU load
- web server load versus DB server load
- robustness and complexity of the solution
- traffic between database and web server
- ...

While most of these are obvious let me elaborate on one single aspect of
the robustness and complexity question, just as an example of what you
should think about.
What needs to happen if a new photo is added or an existing photo is
changed?

In case of the dynamically generated thumbnail there is no risk of
thumbnail and picture being out of sync and there will always be a
thumbnail for each picture. But the conversion software must be
installed, up and running, and maintained together with the web service
itself which adds complexity and reduces robustness at runtime of the
service.
In case of cached thumbnails you need to established a procedure,
automated or manual, to update the thumbnails upon change to the
original photo. This adds the risk of out-of-sync thumbnails,
significantly increases the complexity for adding/changing photos, while
at the same significanlty reduces the complexity and thus increases the
robustness of the web service itself.

Only you can decide based on your user scenarios which one is better:
simplicity and reliability while adding/changing photos or simplicity
and reliability while running the web service. 

jue


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

Date: Sat, 5 Sep 2009 21:55:15 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Another way of resizing an Image?
Message-Id: <slrnha5gh3.fs0.hjp-usenet2@hrunkner.hjp.at>

On 2009-09-05 13:58, ccc31807 <cartercc@gmail.com> wrote:
> On Aug 25, 12:29 pm, "Graham" <graham.s...@stowassocs.co.uk> wrote:
>> Actually, that's the perfect answer! I now know that the guy who's taking
>> the images can only take them 2592 x 1944 - far too big to sensibly upload
>> to the server anyway. So I'll write a script that will resize them to 800 x
>> 600 on my machine and also create 160 x 120 thumbs too, then upload the lot
>> to the server. Job done!
>
> I'm starting a project (a web app) that will require thumbnails of a
> fairly large number of JPGs that are already accessible over a web
> server.
>
> Would it be better to write a script to make all the thumbnails at
> once and store them in the database along with the full size pics?
>
> Or would it be better to create the thumbnail dynamically when it's
> requested? We don't anticipate much traffic for this.

Jürgen already mentioned some tradeoffs, I'll add another: latency.

If you compute all the thumbnails at once, that may take a significant
time when you add a bunch of new images. Let's say you add 1000 images
and computing one thumbnail takes 1 second, that's a bit more than a
quarter of an hour you have to wait until the newly added images can be
viewed. 

If you compute the thumbnail images only when they are first requested,
you can reduce that latency at the start: If you have 50 thumbnails in
an index page, the first person to access an index page will have to
wait less than a minute. Sounds a lot better, doesn't it?

But now it's a user who has to wait a minute instead of a webmaster who
has to wait 17 minutes. The user doesn't know why it is so slow and
probably doesn't care anyway. Is a good idea to let the first user wait?
(there's a good chance that the first user will be your boss)

	hp



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

Date: Sat, 5 Sep 2009 15:23:30 -0700 (PDT)
From: Faith Greenwood <fgnowfg@gmail.com>
Subject: copy specific lines
Message-Id: <1edfe83e-beaf-4212-9f68-925aa2408200@s6g2000vbp.googlegroups.com>

Hi,

I am trying to split a file into two parts. My file is as follows:

data
1
2
3
end data
data
4
5
6
end data

I want to split the file into two parts, w/ the first file having the
following:
data
1
2
3
end data

and the second file having:
data
4
5
6
end data

I have the following code:

open(SPLITTY, "<", "/media/hd/test.txt");
my $linecnt=0;
while(<SPLITTY>){
if(/data/../end data/){
open(YESSPLIT,">>","/media/hd/testtwo.txt");
print YESSPLIT $_;
close YESSPLIT;
}
}
close SPLITTY;

however, this just copies the original file to a new file. How can I
tweak this to get what I am looking for?



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

Date: Sat, 05 Sep 2009 18:01:08 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: copy specific lines
Message-Id: <i326a5d005j09bj346lelijb6vnhdip0bi@4ax.com>

Faith Greenwood <fgnowfg@gmail.com> wrote:
>I am trying to split a file into two parts. My file is as follows:
>
>data
>1
>2
>3
>end data
>data
>4
>5
>6
>end data
>
>I want to split the file into two parts, w/ the first file having the
>following:
>data
>1
>2
>3
>end data
>
>and the second file having:
>data
>4
>5
>6
>end data
>
>I have the following code:

You should always use warnings and strict.

>open(SPLITTY, "<", "/media/hd/test.txt");

You should always check the success of open().

>my $linecnt=0;

What's that for? You never use that variable anywhere.

>while(<SPLITTY>){
	print YESSPLIT $_;
[old three lines snipped]
	if(/end data/){
		close YESSPLIT;
		open(Y	ESSPLIT,">>","/media/hd/testtwo.txt") or
errorhandling;
	}
	close YESSPLIT;
>}
>close SPLITTY;

I think that should work.

jue


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

Date: Fri, 04 Sep 2009 18:19:52 -0700
From: sln@netherlands.com
Subject: Re: create a form with cgi and a multidimensional array (0/1)
Message-Id: <rmd3a51tq2gp5mh51lar3ojdra0r08i9eu@4ax.com>

On Fri, 4 Sep 2009 07:22:57 -0700 (PDT), Marek <mstep@podiuminternational.org> wrote:

>On 4 Sep., 12:01, s...@netherlands.com wrote:
<snip>
>Here just
>for fun, my adaptation a bit more complicate ...
>
>
>Best greetings from Munich
>
>
>marek
>
>

I like it, works great! Background colors look very nice.
See, you added time menu's.

>                td( { -align => 'left' }, join( "/", @menus1 ) . " - " . join( ":", @menus2 ) )
                                                                ^       ^
Its nice you can do join here but its not necessary
and actually slows it down. As you see td() takes multiple parameters
in a list. If a list item is a anonymous hash, its an attribute, otherwise
the element is already joined inside the td() sub.
So, it can be replaced by this without creating the larger temporary.

                td( { -align => 'left' }, join( "/", @menus1 ), ' - ', join( ":", @menus2 ) )

I thought you were going with input fields for hours:minutes, but this works good.

See ya.
-sln



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

Date: Sat, 05 Sep 2009 22:00:02 GMT
From: PerlFAQ Server <brian@theperlreview.com>
Subject: FAQ 1.3 Which version of Perl should I use?
Message-Id: <CbBom.213710$zq1.202557@newsfe22.iad>

This is an excerpt from the latest version perlfaq1.pod, which
comes with the standard Perl distribution. These postings aim to 
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

1.3: Which version of Perl should I use?

    (contributed by brian d foy)

    There is often a matter of opinion and taste, and there isn't any one
    answer that fits everyone. In general, you want to use either the
    current stable release, or the stable release immediately prior to that
    one. Currently, those are perl5.10.x and perl5.8.x, respectively.

    Beyond that, you have to consider several things and decide which is
    best for you.

    *   If things aren't broken, upgrading perl may break them (or at least
        issue new warnings).

    *   The latest versions of perl have more bug fixes.

    *   The Perl community is geared toward supporting the most recent
        releases, so you'll have an easier time finding help for those.

    *   Versions prior to perl5.004 had serious security problems with
        buffer overflows, and in some cases have CERT advisories (for
        instance, http://www.cert.org/advisories/CA-1997-17.html ).

    *   The latest versions are probably the least deployed and widely
        tested, so you may want to wait a few months after their release and
        see what problems others have if you are risk averse.

    *   The immediate, previous releases (i.e. perl5.8.x ) are usually
        maintained for a while, although not at the same level as the
        current releases.

    *   No one is actively supporting Perl 4. Five years ago it was a dead
        camel carcass (according to this document). Now it's barely a
        skeleton as its whitewashed bones have fractured or eroded.

    *   There is no Perl 6 release scheduled, but it will be available when
        it's ready. Stay tuned, but don't worry that you'll have to change
        major versions of Perl; no one is going to take Perl 5 away from
        you.

    *   There are really two tracks of perl development: a maintenance
        version and an experimental version. The maintenance versions are
        stable, and have an even number as the minor release (i.e.
        perl5.10.x, where 10 is the minor release). The experimental
        versions may include features that don't make it into the stable
        versions, and have an odd number as the minor release (i.e.
        perl5.9.x, where 9 is the minor release).



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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in 
perlfaq.pod.


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

Date: Sat, 05 Sep 2009 16:00:03 GMT
From: PerlFAQ Server <brian@theperlreview.com>
Subject: FAQ 3.2 How can I use Perl interactively?
Message-Id: <7Wvom.136039$8B7.101018@newsfe20.iad>

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to 
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

3.2: How can I use Perl interactively?

    The typical approach uses the Perl debugger, described in the
    perldebug(1) manpage, on an "empty" program, like this:

        perl -de 42

    Now just type in any legal Perl code, and it will be immediately
    evaluated. You can also examine the symbol table, get stack backtraces,
    check variable values, set breakpoints, and other operations typically
    found in symbolic debuggers.



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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in 
perlfaq.pod.


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

Date: Sat, 05 Sep 2009 04:00:02 GMT
From: PerlFAQ Server <brian@theperlreview.com>
Subject: FAQ 3.23 Can I write useful Perl programs on the command line?
Message-Id: <6nlom.7499$nP6.3503@newsfe25.iad>

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to 
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

3.23: Can I write useful Perl programs on the command line?

    Yes. Read perlrun for more information. Some examples follow. (These
    assume standard Unix shell quoting rules.)

        # sum first and last fields
        perl -lane 'print $F[0] + $F[-1]' *

        # identify text files
        perl -le 'for(@ARGV) {print if -f && -T _}' *

        # remove (most) comments from C program
        perl -0777 -pe 's{/\*.*?\*/}{}gs' foo.c

        # make file a month younger than today, defeating reaper daemons
        perl -e '$X=24*60*60; utime(time(),time() + 30 * $X,@ARGV)' *

        # find first unused uid
        perl -le '$i++ while getpwuid($i); print $i'

        # display reasonable manpath
        echo $PATH | perl -nl -072 -e '
            s![^/+]*$!man!&&-d&&!$s{$_}++&&push@m,$_;END{print"@m"}'

    OK, the last one was actually an Obfuscated Perl Contest entry. :-)



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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in 
perlfaq.pod.


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

Date: Sat, 5 Sep 2009 10:04:21 -0700 (PDT)
From: asim malik <asim.ssat@gmail.com>
Subject: Mediterranean Diet Could Eliminate Prescriptions for New Type II  Diabetics
Message-Id: <04ee1d88-bdeb-4152-b335-269b16dc2bc5@d15g2000prc.googlegroups.com>

A simple change in diet could mean the elimination of medications for
Type II diabetics
www.hn786.blogspot.com


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

Date: 5 Sep 2009 20:07:30 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: need help, will pay
Message-Id: <7gfuo2F2pcgnjU2@mid.uni-berlin.de>

Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
> I think you haven't read the "stonehenge article" mentioned by boman.
> Here it is: http://www.stonehenge.com/merlyn/LinuxMag/col39.html

No, I hadn't since I could find it. Thanks for the link.

                             Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


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

Date: 5 Sep 2009 11:53:34 GMT
From: greymausg@mail.com
Subject: Padre
Message-Id: <slrnha4jkr.45l.greymausg@maushome.org>

Has anyone used Padre?
(Debian, finding it hard to install, problem with Wx
, trying to learn some Java, which made me realize how handy an IDE
is)

-- 
Greymaus....
Are You a `human` or a `zombie`?
Case A, vote "No".


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

Date: Sat, 05 Sep 2009 14:03:11 +0200
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Padre
Message-Id: <7qk4a5l4ju5aldi0nqgglaf7hlql54pp82@4ax.com>

greymausg@mail.com wrote:

>Has anyone used Padre?
>(Debian, finding it hard to install, problem with Wx
>, trying to learn some Java, which made me realize how handy an IDE
>is)

Do you know Padre has its own forums to ask questions? In particular, an
IRC channel and a mailing list:

	http://padre.perlide.org/support.html

-- 
	Bart.


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

Date: 5 Sep 2009 13:53:34 GMT
From: greymausg@mail.com
Subject: Re: Padre
Message-Id: <slrnha4rib.8bu.greymausg@maushome.org>

On 2009-09-05, Bart Lateur <bart.lateur@pandora.be> wrote:
> greymausg@mail.com wrote:
>
>>Has anyone used Padre?
>>(Debian, finding it hard to install, problem with Wx
>>, trying to learn some Java, which made me realize how handy an IDE
>>is)
>
> Do you know Padre has its own forums to ask questions? In particular, an
> IRC channel and a mailing list:
>
> 	http://padre.perlide.org/support.html
>

Oh. its irc.perl.org.. 


-- 
Greymaus....
Are You a `human` or a `zombie`?
Case A, vote "No".


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

Date: 5 Sep 2009 13:53:35 GMT
From: greymausg@mail.com
Subject: Re: Padre
Message-Id: <slrnha4rfg.8bu.greymausg@maushome.org>

On 2009-09-05, Bart Lateur <bart.lateur@pandora.be> wrote:
> greymausg@mail.com wrote:
>
>>Has anyone used Padre?
>>(Debian, finding it hard to install, problem with Wx
>>, trying to learn some Java, which made me realize how handy an IDE
>>is)
>
> Do you know Padre has its own forums to ask questions? In particular, an
> IRC channel and a mailing list:
>
> 	http://padre.perlide.org/support.html
>

Thanks.. IRC channel?. freenode?



-- 
Greymaus....
Are You a `human` or a `zombie`?
Case A, vote "No".


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

Date: Sat, 5 Sep 2009 04:43:45 -0700 (PDT)
From: rlf <rlfoster1@cox.net>
Subject: Why does "$v = @ARGV[0]" work ?
Message-Id: <adf91d31-af26-4c07-8889-04d07fea8913@a7g2000yqo.googlegroups.com>

I've taken over some perl code that starts out with :

$v = @ARGV[0]

That's an @ sign on ARGV, not a dollar sign.

This seems to get the first element OK, but I don' know why. I've
never seen this construct used before, and I cannot find a parser rule
that says that you could use EITHER a $ or @ in this context.

Am curious to know why the result of this parse gets the same action
as taking the scalar with

$v = $ARGV[0]


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

Date: Sat, 05 Sep 2009 14:35:51 +0200
From: Peter Makholm <peter@makholm.net>
Subject: Re: Why does "$v = @ARGV[0]" work ?
Message-Id: <874orhsh5k.fsf@vps1.hacking.dk>

rlf <rlfoster1@cox.net> writes:

> I've taken over some perl code that starts out with :
>
> $v = @ARGV[0]
>
> That's an @ sign on ARGV, not a dollar sign.

@ARGV[0] makes an array slice with a single element. It is explained
in 'perldoc perldata' (look for the heading 'Slices'). I'm not really
sure if a single element slice has any usable function, but they are
allowed.

//Makholm


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

Date: Sat, 05 Sep 2009 07:45:44 -0500
From: Don Piven <spamtrap@piven.net>
Subject: Re: Why does "$v = @ARGV[0]" work ?
Message-Id: <3sqdnfTYFOflwD_XnZ2dnUVZ_hOdnZ2d@speakeasy.net>

rlf wrote:
> I've taken over some perl code that starts out with :
> 
> $v = @ARGV[0]
> 
> That's an @ sign on ARGV, not a dollar sign.
> 
> This seems to get the first element OK, but I don' know why. I've
> never seen this construct used before, and I cannot find a parser rule
> that says that you could use EITHER a $ or @ in this context.
> 
> Am curious to know why the result of this parse gets the same action
> as taking the scalar with
> 
> $v = $ARGV[0]

@ARGV[0] is a one-element slice out of the @ARGV array, which is then 
used as a list constructor for the assignment.  Now, man perldata says 
that "[in] a context not requiring a list value, the value of what 
appears to be a list literal is simply the value of the final element", 
working the same as C's and Perl's comma operator.  More generally, 
evaluating a list constructor in scalar context yields you that 
last-element behavior, while evaluating a list VARIABLE in scalar 
context gets you the length of the list.

Since the assignment is in scalar context, you get the last element of 
the list constructor.  For example:

@list = ('foo', 'bar', 'krunk', 'quux') ;
$a = $list[0] ;		# sets $a to 'foo' as expected
$b = @list[0] ;		# slices ('foo') out of @list and
			# assigns last element to $b
$c = @list[2] ;		# sets $c to 'krunk'

 ... which then leads to ...

@d = @list[1,3] ;	# sets @d to ('bar', 'krunk', 'quux')
$e = @list[1,3] ;	# sets $e to 'quux'

Don


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

Date: Sat, 5 Sep 2009 16:42:00 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Why does "$v = @ARGV[0]" work ?
Message-Id: <8fdan6-s7u.ln1@osiris.mauzo.dyndns.org>


Quoth Don Piven <spamtrap@piven.net>:
> rlf wrote:
> > I've taken over some perl code that starts out with :
> > 
> > $v = @ARGV[0]
> > 
> > That's an @ sign on ARGV, not a dollar sign.
> > 
> > This seems to get the first element OK, but I don' know why. I've
> > never seen this construct used before, and I cannot find a parser rule
> > that says that you could use EITHER a $ or @ in this context.

It's worth noting that 'use warnings' will warn about this. If you have
inherited some code with dodgy coding standards, my recommendation would
be to start by adding

    use strict;
    use warnings;

at the top and fixing all the resultant diagnostics.

<snip>
> 
> @ARGV[0] is a one-element slice out of the @ARGV array, which is then 
> used as a list constructor for the assignment.  Now, man perldata says 
> that "[in] a context not requiring a list value, the value of what 
> appears to be a list literal is simply the value of the final element", 
> working the same as C's and Perl's comma operator.  More generally, 
> evaluating a list constructor in scalar context yields you that 
> last-element behavior, while evaluating a list VARIABLE

An array. The difference between list and array is important.

> in scalar 
> context gets you the length of the list.

Ben



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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 2585
***************************************


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