[22923] in Perl-Users-Digest
Perl-Users Digest, Issue: 5143 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 26 21:05:42 2003
Date: Thu, 26 Jun 2003 18:05:08 -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 Thu, 26 Jun 2003 Volume: 10 Number: 5143
Today's topics:
Re: Altering values by reference <bart.lateur@pandora.be>
Re: Extracting/Matching Comments <abigail@abigail.nl>
Re: Forking child process with WWW::Automate <bart.lateur@pandora.be>
Re: HTML::TableExtract Simple question (Jay Tilton)
Re: HTML::TableExtract Simple question (Tad McClellan)
Re: Module of sending http 1.1 and/or 1.0 requests <bdonlan@bd-home-comp.no-ip.org>
Re: need assistance understanding multilevel hashes. (Jay Tilton)
Re: Offer tips, comments on this code (generates html t <usenet@expires082003.tinita.de>
Re: Offer tips, comments on this code (generates html t (Tad McClellan)
Re: Offer tips, comments on this code (generates html t (Tad McClellan)
Re: Offer tips, comments on this code (generates html t <emschwar@pobox.com>
Re: PGP decrypt perl script <glex_nospam@qwest.net>
Re: Q: "my" variables and "no strict 'refs'" (Tad McClellan)
Segmentation fault on "make install" on AIX 4.2 (Mike Cooper)
Re: Segmentation fault on "make install" on AIX 4.2 <zak@mighty.co.za>
Re: simple way to test for undef (Jay Tilton)
Re: simple way to test for undef (Tad McClellan)
Re: Using Formats and stopping between pages (Thoughtstream)
Re: why this doesn't work (tm)? :) <bart.lateur@pandora.be>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 26 Jun 2003 23:42:20 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Altering values by reference
Message-Id: <l01nfvkcee4sf9q064033pu8f8j06mna1o@4ax.com>
Dela Lovecraft wrote:
>Is there a way of altering a variable sent as a reference
>to a subroutine in Perl *without* using a return value?
Yes. The values in @_° are aliases to the original values. So modify
$_[0] directly, and you'll modify the first parameter; etc.
For example:
sub inc {
$_[0]++;
}
my $x = 3;
inc $x;
print $x; # prints "4"
It's only when assigning the contents out of @_ to your local (usually
lexical) variables, that you actually make a copy.
sub foo {
my $x = shift; # copy
my($y, $z) = @_; # copy
$x++; $y++; $z++;
# The original parameters are still unaltered
}
--
Bart.
------------------------------
Date: 26 Jun 2003 23:01:54 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Extracting/Matching Comments
Message-Id: <slrnbfmur2.el.abigail@alexandra.abigail.nl>
darkname (member31962@dbforums.com) wrote on MMMDLXXXVI September
MCMXCIII in <URL:news:3045329.1056620857@dbforums.com>:
**
** Hello everyone!!
**
** Does anyone knows a module that parses and extracts comments of a given
** source code file?? (such as C, C++, Java, PL/SQL, PERL, etc)!!?
**
** Thereīs a module in CPAN that was designed to do this
** (Regexp::Common::comment) but this module donīt preview all cases for
** example in PERL!!
Regexp::Common::comment was NOT designed to do language parsing.
It's designed to give regexes for comments of certain languages.
So, it you write a parser, and at a certain point you're ready
to match a comment, you could use the regexp in the module.
But the module isn't a language parser, and it will never be.
**
** Because.. there are special cases that should be contemplated such as:
**
** @array=/1 # 2 3 4/;
** print"#This is not a comment";
** $size=?#array;
** @array=("#", 1,2,3);
**
** How can i do this?
**
** There is another module Text::Balanced that should work to.. with the
** function extract_delimited, where the delimitators would be starting
** with # and ending with \n! But i canīt make this work! :((
**
** Another issue.. is this regex that should get the comments in Perl but
** it doesnīt work also!!
**
** ~ m{
** ( \# .*? \n ) # extract a comment wich starts
** with # to \n
** | " (?: [^"\#]* | \#. )* " # skip over "..."
** | ' (?: [^'\#]* | \#. )* ' # skip over '...'
** | . [^\#"']* # skip over non-comments-or-quotes
** }xgs;
**
** Can someone tell me why??
Because of $#? Because of $#array? Because of here docs? Because of s###?
Extracting comments from Perl is far more complicated than your regex.
Abigail
--
my $qr = qr/^.+?(;).+?\1|;Just another Perl Hacker;|;.+$/;
$qr =~ s/$qr//g;
print $qr, "\n";
------------------------------
Date: Thu, 26 Jun 2003 23:51:55 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Forking child process with WWW::Automate
Message-Id: <nh1nfv0m26uksj1c026d4dtj46crldu9u3@4ax.com>
Graham Wood wrote:
>I'm attempting to automate a login to a web server with WWW::Automate
>and then to continue navigating through the website.
Currently the favourite module to do this kind of thing is
WWW::Mechanize, which is "inspired" by WWW::Automate. In addition,
there's WWW::Mechanize::Shell, which lets you explore the website using
WWW::Mechanize using an interactive prompt interface.
It has built-in support for cookies.
--
Bart.
------------------------------
Date: Thu, 26 Jun 2003 22:32:59 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: HTML::TableExtract Simple question
Message-Id: <3efb71b6.425372035@news.erols.com>
ksu1wd@mit.edu (Avatar) wrote:
: I am trying to use the module HTML::TableExtract with little success,
: here is what I have tried so far.
:
: use HTML::TableExtract;
: $te= new HTML::TableExtract( headers => [qw(One Two Three)] );
Does the HTML contain a table with those column headers?
: $te->parse($html_string);
: Now what to put into that html string.
: Here is what I have tried to do.
: I have html saved in a text file. So I read from the text file, in an
: attempt to put all of the html into the string $html_string, using
:
: open(FILEHANDLE,"<file.txt");
Always test the return from open() for success.
open(FILEHANDLE,"<file.txt") or die $!;
: text="";
That's an error. Did you retype your code into the article, or did
you copy/paste it?
Retyping = bad. Copy/pasting = good.
: while (read (FILEHANDLE, $newtext, 1)){
: $text.=$newtext;
: }
More perlishly,
my $text = do{
local $/;
<FILEHANDLE>;
};
: So this effectively puts all of the html into the scalar html_string.
No, it's being put into the scalar $text. Is there an assignment to
$html_string in your code?
: But when I put it into $html_string and run it, nothing appears to
: happen, where it's supposed to print I think the stuff with headers
: one, two, three.
Where is the code that does that printing?
: Then I jsut plain tried cut and copying the text like
: parse(<HTML>....<\HTML>) but that also failed.
Did you try it just like that, without any quoting on the string, or
are you paraphrasing your code?
------------------------------
Date: Thu, 26 Jun 2003 17:18:42 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: HTML::TableExtract Simple question
Message-Id: <slrnbfmsa2.8ab.tadmc@magna.augustmail.com>
Avatar <ksu1wd@mit.edu> wrote:
> I am trying to use the module HTML::TableExtract with little success,
> here is what I have tried so far.
> use HTML::TableExtract;
>
> $te= new HTML::TableExtract( headers => [qw(One Two Three)] );
> $te->parse($html_string);
> Now what to put into that html string.
> But when I put it into $html_string and run it, nothing appears to
> happen, where it's supposed to print
There is no print() in the code we've been shown, so we all
think that it should NOT be print()ing anything, so everything
is as it should be.
What code was it that you were expecting to make some output?
> Then I jsut
(gulp)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 26 Jun 2003 17:57:44 -0400
From: "bd" <bdonlan@bd-home-comp.no-ip.org>
Subject: Re: Module of sending http 1.1 and/or 1.0 requests
Message-Id: <pan.2003.06.26.21.57.43.767596@bd-home-comp.no-ip.org>
On Thu, 26 Jun 2003 01:54:45 +0000, Abigail wrote:
> bd (bdonlan@bd-home-comp.no-ip.org) wrote on MMMDLXXXVI September
> MCMXCIII in <URL:news:pan.2003.06.26.01.27.16.347494@bd-home-comp.no-ip.org>:
> %% On Wed, 25 Jun 2003 18:25:24 -0700, Yuchung Cheng wrote:
> %%
> %% > Anybody knows what perl module I can use to specify the http request as
> %% > http 1.1 or 1.0? It seems I can't do that with http::request. Thank you.
> %%
> %% Have you taken a look at LWP?
>
>
> Considering that HTTP::Request is part of the LWP bundle, what do you
> think the answer to your question is?
Ah, didn't know that.
--
Freenet distribution not available
In real love you want the other person's good. In romantic love you
want the other person.
-- Margaret Anderson
------------------------------
Date: Thu, 26 Jun 2003 22:18:31 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: need assistance understanding multilevel hashes.
Message-Id: <3efb6e46.424492130@news.erols.com>
Allen Wooden <allen.wooden@educate.invalid> wrote:
: After reading the FAQ
: (http://www.perldoc.com/perl5.6/pod/perlfaq7.html#How-can-I-use-a-variable-as-a-variable-name-)
: about multilevel hashes I'm still having a tough time understanding
: how to use them in the context of the program I'm trying to write.
:
: My program get one or more args from commandline. One of those
: arguments is an 'customer' name. (ie: ./prog customer).
:
: within the program it load a configuration file which has a bunch of
: hashes that coincide with the customer name. It then runs and
: generates output using data from the customer's hash name.
Some clarification is needed there. Some example code would help.
Are you saying the configuration file is executable Perl that defines
hashes, and the desired hash can only be accessed by its name? E.g.
%Fred = ( spouse => 'Wilma', child => 'Pebbles' );
%Barney = ( spouse => 'Betty', child => 'Bam Bam');
: what I'm having trouble is getting the customer name argument to pull
: the data from the correct hash without using symbolic references.
Like, say,
$customer_name = 'Fred';
%customer_data = %$customer_name;
: - From the way I read the FAQ, multilevel hashes are what I should use
: as opposed to turning off strict refs and doing thing symbolically.
If I've gauged the problem accurately, you're SOL due to a bad design
decision from the past. Yes, the symbol table could be used as a
hash-of-hashes,
%customer_data = %{ $::{$customer_name} };
but that's just dodging the use of symbolic references without
addressing the real issue. Don't dork with the symbol table unless
there's no other way.
You should really want a private namespace--your own hash-of-hashes to
thrash around in.
%customers = (
Fred => { spouse => 'Wilma', child => 'Pebbles' },
Barney => { spouse => 'Betty', child => 'Bam Bam' },
);
$customer_name = 'Fred';
%customer_data = %{ $customers{$customer_name} };
At the very least, sequester the config file in its own package to
minimize the chances of clobbering symbols in other packages.
The ideal solution would be to divorce code from data completely and
forever.
------------------------------
Date: 26 Jun 2003 22:25:36 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: Offer tips, comments on this code (generates html to index image files)
Message-Id: <bdfrt0$r82ge$2@ID-24002.news.dfncis.de>
Janek Schleicher wrote:
> You also could leave out something like
> $_ =~ /.../
> and
> push @entries,$_
> as the short versions
> /.../
> and
> push @entries;
> would also work
no, push says: "Useless use of push with no values".
but it would be nice if push() worked like shift()
without arguments. i think i never tried that out before,
and now i was surprised that it didn't work =)
(would be even more perlish if you could say "push;"
instead of "push @_, $_;")
regards, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/ \ \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -
------------------------------
Date: Thu, 26 Jun 2003 16:59:56 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Offer tips, comments on this code (generates html to index image files)
Message-Id: <slrnbfmr6s.8ab.tadmc@magna.augustmail.com>
David Oswald <spamblock@junkmail.com> wrote:
> I cleaned it up and perlized it considerably, and used here docs. But
> somehow I broke it and can't figure out how to fix it.
> #!/usr/bin/perl -w
> use strict;
Ahhh. The world is a better place than it used to be!
> # --- Declarations ---
> my @imagefiles;
[snip]
> if (@imagefiles = getdir($dirname)) {
All the other "global" (actually file-scoped lexicals) variables
are config-type things that seem sensibly located at the top
of the program.
But @imagefiles is only used in the if-block, so its scope should
be limited to the if-block:
if ( my @imagefiles = getdir($dirname) ) { # declare it where you use it
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 26 Jun 2003 17:07:01 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Offer tips, comments on this code (generates html to index image files)
Message-Id: <slrnbfmrk5.8ab.tadmc@magna.augustmail.com>
David Oswald <spamblock@junkmail.com> wrote:
> somehow I broke it and can't figure out how to fix it.
> print HTML <<HTML_BLOCK;
> <p>
> <img src = \"$_\" alt=$_ >
> <a href = \"$_\" target = \"ImageWindow\" >
> <br> $_ </a>
> </p>
> HTML_BLOCK
> #Prints an html footer; the "closing" stuff.
> sub print_foot {
> And here's what errors I get when I now try to run it:
> Bareword "print_foot" not allowed while "strict subs" in use at
> I think that the issue is that my here documents are somehow not being
> terminated properly, resulting in subs not being defined. ...could that be?
Perhaps. But with a tool that mangles code between the real code and
the code that we can see, there's no way to tell.
Spaces matter a great deal to here-docs, we must have exactly
the right stuff if we are to spot potential problems.
It _looks_ OKish to me.
Here-docs are just an alternate form of quoting, switch them
one-by-one to some other form of quoting until the sub definitions
are found, eg:
print HTML "<H1>temp replacement for footer here</H1>\n";
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Jun 2003 16:48:16 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Offer tips, comments on this code (generates html to index image files)
Message-Id: <etoadc4pia7.fsf@wormtongue.emschwar>
"David Oswald" <spamblock@junkmail.com> writes:
> Thanks to all for the input. Now that I've got it working again, and now
> that it passes both "-w" and "use strict;", I'd like to hear comments again
> from a style, efficiency, and lexicon standpoint: How can the existing code
> be improved upon retaining equal functionality? In other words, I'm not
> looking for how to add features. I'm looking at critiquing the script
> holding its given featureset constant.
First: prototype all your functions. That helps you immensely-- you'll know
instantly if you forgot a required argument.
'perldoc perlsub' to see how.
My personal style is to put the 'main' section at the end. Putting it
at the beginning, as you do, can come to bite you in the end (pun most
certainly intended). How, you ask? Simple: If someone adds a bit of
code between two sub definitions, it can get executed after your
"Finishing" message. This is bad, bad, bad! Putting your code at the
end makes it obvious where it ends, IMO.
> if (@imagefiles = getdir($dirname)) {
rename 'getdir' to 'get_images' or some such; a name like 'getdir'
suggests to me that it returns a directory name, or dirhandle.
> open_html_file($outfile);
You might consider having this return a filehandle, or an IO::File
object. You'd then pass that into the print_* functions and
close_html_file();
> #Open the current directory and get all image filenames into a list.
> sub getdir {
sub getdir($) {
See if you can come up with something that grabs you more than
'getdir'; I personally hate names like this as a coder, because I get
them stuck into my head, and can't ever think of something that
exactly captures the full nuances.... bleh. :)
> #Opens (@_) as file HTML for output.
> sub open_html_file {
sub open_html_file($) {
... you get the idea. 'perldoc perlsub' for details.
> #Prints an html footer; the "closing" stuff.
> sub print_foot {
> print HTML <<HTML_BLOCK;
> <hr>
> Page created by $scriptver .
FYI, I know you said no features, but it'd be handy if it printed the
date the file was created as well-- I like knowing how old it's meant
to be.
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
------------------------------
Date: Thu, 26 Jun 2003 17:28:21 -0500
From: "J. Gleixner" <glex_nospam@qwest.net>
Subject: Re: PGP decrypt perl script
Message-Id: <KrKKa.66$j4.57697@news.uswest.net>
Mike wrote:
> Hello. I am in need of direction on where I might find a perl script
> that will automatically decrypt pgp files that have been FTP'd to a
> server.
>
> Any help would be appreciated. I am new to perl and have had no luck
> trying to create it on my own.
Check: http://search.cpan.org
Crypt::PGPSimple looks like it might do what you want.
http://search.cpan.org/author/JHINKLE/Crypt-PGPSimple-0.13/PGPSimple.pm
------------------------------
Date: Thu, 26 Jun 2003 17:29:58 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Q: "my" variables and "no strict 'refs'"
Message-Id: <slrnbfmsv6.8ab.tadmc@magna.augustmail.com>
Daniel Friedman <danielf@erols.com> wrote:
> The bottom of p.594 in the Camel book (3rd edition) says this:
>
> no strict 'refs';
> $name = "variable";
> $$name = 7 ; # Sets $variable to 7
Since the Camel is a reference, it must cover all of Perl, even
the parts that a day-to-day Perl programmer should (almost?) never
need to use.
Symbolic References are one of those things.
> ...but I don't obtain that if I declare the variables with "my".
And that is a Good Thing.
> What am I not understanding here?
Perl's two completely separate systems of variable scoping,
package variables and lexical variables.
For more info, see:
"Coping with Scoping":
http://perl.plover.com/FAQs/Namespaces.html
Then repeat this mantra before each programming session:
Always prefer lexical (my) over package (our) variables,
except when you can't.[1]
:-)
[1] about the only sensible "when you can't" for a Perl
beginner is for Perl's built-in variables, they are
always package variables.[2]
[2] about the only sensible "when you can't" for an intermediate
Perl programmer is when you have code in multiple files.[3]
[3] nearly every other place is "for wizards only".[4]
[4] which is OK, because you can most often use your very own hash
rather than borrow perl's special symbol table hash, and avoid
symbolic references altogether while still getting What You Want.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Jun 2003 15:27:02 -0700
From: mcooper@magnicomp.com (Mike Cooper)
Subject: Segmentation fault on "make install" on AIX 4.2
Message-Id: <20c3b557.0306261427.55a90aa8@posting.google.com>
I'm attempting to install perl 5.8.0 from source on AIX 4.2. When I
run "make
install" (after a successful "make") I get a Segmentation fault:
aix2% make install
.... lots of text deleted ....
./perl installperl
gnumake[1]: *** [install.perl] Segmentation fault (core dumped)
gnumake[1]: Leaving directory `/tmp/p.obj'
gnumake: *** [install] Error 2
aix2% /usr/local/bin/gdb perl
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-ibm-aix4.2.0.0"...
(gdb) run installperl
Starting program: /tmp/p.obj/perl installperl
Program received signal SIGSEGV, Segmentation fault.
0x10008b68 in Perl_pp_entersub ()
(gdb) where
#0 0x10008b68 in Perl_pp_entersub ()
#1 0x100a840c in Perl_runops_standard ()
#2 0x1005bf48 in S_call_body ()
#3 0x1005bc04 in Perl_call_sv ()
#4 0x1005fbb0 in S_call_list_body ()
#5 0x1005f778 in Perl_call_list ()
#6 0x10043c74 in Perl_newATTRSUB ()
#7 0x1003f470 in Perl_utilize ()
#8 0x100996f0 in Perl_yyparse ()
#9 0x1005ab28 in S_parse_body ()
#10 0x10059b7c in perl_parse ()
#11 0x100002b4 in main ()
#12 0x100001a0 in __start ()
(gdb) quit
aix2% file perl
perl: executable (RISC System/6000) or object module not
stripped
A good number of "make test" tests also fail.
When running Configure I accept all default values. I compiled with
GCC 3.3,
but also have tried GCC 2.95.1. I've tried this numerous times all
with the
same result.
The system is freshly installed with default options. It has the AIX
updates applied.
If I boot the system off of its AIX 4.3 OS disk and
configure/build/install perl, I have no problems.
Anybody have any clues on this?
Thanks in advance.
mike
------------------------------
Date: Fri, 27 Jun 2003 01:34:12 +0200
From: Zak McGregor <zak@mighty.co.za>
Subject: Re: Segmentation fault on "make install" on AIX 4.2
Message-Id: <bdfvqa$ehb$1@ctb-nnrp2.saix.net>
On Fri, 27 Jun 2003 00:27:02 +0200, Mike Cooper <"Mike Cooper"
<mcooper@magnicomp.com>> wrote:
> I'm attempting to install perl 5.8.0 from source on AIX 4.2. When I run
> "make
> install" (after a successful "make") I get a Segmentation fault:
[snip]
All your AIX belong to SCO ;-)
Ciao
Zak
--
========================================================================
http://www.carfolio.com/ Searchable database of 10 000+ car specs
========================================================================
------------------------------
Date: Thu, 26 Jun 2003 22:29:47 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: simple way to test for undef
Message-Id: <3efb7153.425272970@news.erols.com>
ktom <abc@nowhere.com> wrote:
: i have created an array that is sparse, ie there are a number of
: elements which are undefined, because i have used a numeric index to the
: array and not all of the intermediate indices get used.
:
: here is the code to print this array, which doesn't work...
:
: foreach my $item ( @ca ) {
: if( defined ref $ca[$item] ) {
Why the ref()? Are you expecting the elements of @ca to be something
besides ordinary scalars?
Why test the return from ref() for defined-ness? ref() is documented
to return a false value if its argument is not a reference, but
'false' and 'undefined' are not interchangable.
: print "chain $item has $ca[$item] exceptions\n";
Maybe you're shooting for something more like this:
if( defined $item && defined $ca[$item] ) {
print "chain $item has $ca[$item] exceptions\n";
}
: it seems the autovivification process is biting me,
No autovivification is happening.
------------------------------
Date: Thu, 26 Jun 2003 17:40:51 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: simple way to test for undef
Message-Id: <slrnbfmtjj.8ab.tadmc@magna.augustmail.com>
ktom <abc@nowhere.com> wrote:
> Subject: simple way to test for undef
Testing for undef has nothing to do with your problem.
> foreach my $item ( @ca ) {
> if( defined ref $ca[$item] ) {
$item gets the _values_ from @ca, you seem to be expecting it to
get the _indexes_ of the values. So you want either:
foreach my $item ( @ca ) { # preferred
if( defined ref $item ) {
or
foreach my $index ( 0 .. $#ca ) {
if( defined ref $ca[$index] ) {
> am i making harder than it needs to be.
I think the answer to that should be clear by now. :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Jun 2003 15:12:29 -0700
From: damian@conway.org (Thoughtstream)
Subject: Re: Using Formats and stopping between pages
Message-Id: <704a6b5d.0306261412.e5a32aa@posting.google.com>
http://search.cpan.org/author/RMITZ/io-page-0.02/
------------------------------
Date: Thu, 26 Jun 2003 23:36:13 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: why this doesn't work (tm)? :)
Message-Id: <tq0nfv42kbu36mjibivoels78p261ns4nr@4ax.com>
Matija Papec wrote:
>print $i for $i(1..3);
>
>is there a reason, or simply just doesn't work?
This syntax only works with $_ as an implied loop variable.
print for 1 .. 3;
--
Bart.
------------------------------
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 5143
***************************************