[15760] in Perl-Users-Digest
Perl-Users Digest, Issue: 3173 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 26 09:05:39 2000
Date: Fri, 26 May 2000 06:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959346312-v9-i3173@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 26 May 2000 Volume: 9 Number: 3173
Today's topics:
"Decoding" variable <robert@pharmapartners.nl>
Re: "or" vs. "||" - operator precedence question <rhomberg@ife.ee.ethz.ch>
[Q] How to intercept browser's HTTP? <kj0@mailcity.com>
Re: array within array revisited <nospam@devnull.com>
Re: Arrays of arrays <uackermann@orga.com>
Re: bug with 5.004_04? <nospam@devnull.com>
Re: Can't Knit Two Files Together <dan@tuatha.sidhe.org>
code fragment help jschand@my-deja.com
Re: code fragment help <billy@arnis-bsl.com>
Re: code fragment help <rhomberg@ife.ee.ethz.ch>
Re: Exec() returned - Script exection Error <nospam@devnull.com>
Re: hashes vs associative arrays (was: Re: Array Questi (Peter Lowe)
Html translation <frank@french-connexion.com>
Re: Listing installed packages? <hmerrill@my-deja.com>
Re: Netscape w/ Perl (Csaba Raduly)
Re: newsgroup archives <thunderbear@bigfoot.com>
Pairing and Parsing DATA <vivekvp@spliced.com>
Re: Pairing and Parsing DATA <thoren@southern-division.com>
Re: Pairing and Parsing DATA <damon_jebb@nai.com>
Re: Perl unusable as a programming language (Bart Lateur)
Re: Perl unusable as a programming language <Tbone@pimpdaddy.com>
ref-to-glob error (*in) <sean77@dds.nl>
Re: ref-to-glob error (*in) <rhomberg@ife.ee.ethz.ch>
Re: Should be in FAQ: "I can't find Net::SMTP" <iltzu@sci.invalid>
Re: Split a number up? <nospam@devnull.com>
Re: Split a number up? <nospam@devnull.com>
Re: system commands <flavell@mail.cern.ch>
time and date conversion <fhoerni@intelcom.fr>
Re: updated : Re: regexes *sigh* damn I hate these thin <thunderbear@bigfoot.com>
Re: use english <nospam@devnull.com>
Re: use english <rhomberg@ife.ee.ethz.ch>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 26 May 2000 14:48:16 +0200
From: "Robert Voesten" <robert@pharmapartners.nl>
Subject: "Decoding" variable
Message-Id: <8glrqt$km3$1@porthos.nl.uu.net>
Hi,
I have a file with some info in it, and I have 2 change it to normal
readable info.
E.g.
DTM07137199810121215203
means "Created on 12 octobre 1998 at 12:15.
This "code" is created with several elements:
- DTM07 is the Date/Time/Period qualifier
- 137 means "Creation date" (another qualifier)
- 1998 is the year at the time of creation
- 10 is the month at the time of creation
- the first 12 is the date at the time of creation
- the second 12 is the amount of hours at the time of creation
- 15 is the amount of minutes at the time of creation
so the date of creation is written like this:
CCYYMMDDHHMM
with a total amount of signs of 35, so every non-used has to be replaced
with a space
So the question is: How do I convert this code into "Date of creation: 12th
Octobre 1998 at 12:15 (PM)"
I hove you can help me out,
Robert Voesten
Pharmapartners BV
Robert@pharmapartners.nl
------------------------------
Date: Fri, 26 May 2000 13:56:56 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: "or" vs. "||" - operator precedence question
Message-Id: <392E6688.BDF65EFC@ife.ee.ethz.ch>
Abigail wrote:
> However, that's only part of your problem.
>
> ($var) = EXPR1 or die;
>
> the assignment is in list context. If EXPR1 returns undef, the result
> of ($var) = EXPR1 is (undef), a *LIST* of one element. One would expect
> that such a list in scalar context returns its element, but assignment
> is special. A "list" assignment in scalar context returns the number
> of elements of the list on the right hand side of the assignment.
> (I fail to use why that's useful at the moment.)
The fact that list assignment in scalar context returns the number of
elements on the right side is useful to count the elements in a list
while forcing list context.
$number_of_matches = () = /pattern/g;
- Alex
------------------------------
Date: 26 May 2000 08:57:30 -0400
From: kj0 <kj0@mailcity.com>
Subject: [Q] How to intercept browser's HTTP?
Message-Id: <8glsbq$8md$1@panix3.panix.com>
Hi. I have a very basic question. I'm learning how to write
free-standing web clients in Perl (using LWP). It would speed matters
considerably if I were able to intercept (so I can study it!) the HTTP
the browser sends out every time one clicks a link, a browser button,
etc. How can I do this?
Thanks,
KJ
P.S. This is not really a Perl question; is there a better forum to
send it to?
------------------------------
Date: 26 May 2000 11:19:20 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: array within array revisited
Message-Id: <8glmjo$ui1$0@216.155.32.231>
In article <8gjpb8$jbp$1@nnrp1.deja.com>, j555@my-deja.com wrote:
| Hi folks,
| Thanks for the replies. I haven't had time to sift through all of them.
| Perhaps I should have stated my question more usefully as this:
|
| How do I extract an array out of a reference to an array?
| I went to the Perl docs but I still find it confusing. Unfortunately
| I'm in a hurry and don't have time to read all the details.
really, honestly, seriously, if you expect to understand this you should
spend more time with
perldoc perlref # <-- here in particular
perldoc perldsc # <-- these two only if you need more complex
perldoc perllol # data structures
I asked about creating a *seriously* complex hash of hash of hash of
list in here and they basically made me figure it out myself instead of
writing the code for me. I heartily recommend this method. took me less
than a day, and I had it cold, by building it in reverse, and teaching
myself in small bits how to dereference the complex hash, and build it
on the fly reading in the data from a file.
using data like this:
utassault=as-urbanassault=AS-UrbanAssault=2424=-1=-1=
utctf=ctf-2bigboxesfilledwithlava=CTF-2BigBoxes=314=-1=-1=
utctf=ctf-2fort=CTF-2Fort=221=-1=-1=
utdma=dm-levitar=DM-Levitar=344=dm-levitar=8=
utdma=dm-lifeforce=DM-Lifeforce=414=-1=-1=
utother=timmyvoicepack=TimmyVoicePack=80=-1=-1=
utother=tnmap_pack1=TN Mappack 1=2287=-1=-1=
to create a complex hash like this:
$master_maps_list{$gametype}{$filename} =
[$title, $size, $review, $rating];
and then take that complex hash and build html out of it with links,
table cells, and etc etc.
it was WAY worth it, since I now know how to re-use this knowledge
instead of having to puzzle out what was done in something someone GAVE
me and perhaps never really understanding it.. now I KNOW it cold.
ask questions and we'll try and help.. ask for code and we'll send you
to the docs. ask for help WITH code you're writing, and you may or may
not get help depending on how far you can get with it, thus showing your
level of understanding to be commensurate with the task.
best way to go. I promise.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 26 May 2000 12:40:52 +0200
From: Ulrich Ackermann <uackermann@orga.com>
Subject: Re: Arrays of arrays
Message-Id: <392E54B4.8C29FA91@orga.com>
"Jacob S. Andersen" wrote:
>
> Hi
>
> Is it possible to have a array of arrays and make a referance to only one
> array like this: (it won't work)
>
> @res = somefunc();
> @tmp = @res[$i];
> print "$tmp[3] $tmp[2]\n";
>
> This one works fine, but it looks more nasty if i using them in 50 different
> places and it's probably slower.
>
> @res = somefunc();
> print "$tmp[$i][3] $tmp[$i][2]\n";
>
> sub somefunc {
> my @result;
> .....
> foreach $aaa (@bbb) {
> ......
> @result = push [ @ccc ];
> }
> return @result;
> }
>
> Regards,
> Jacob
perldoc perllol
Ulrich
--
Ulrich Ackermann
ORGA Kartensysteme GmbH (SY-PEAT-STA)
Tel.:+49.5254.991-925
mailto:uackermann@orga.com
------------------------------
Date: 26 May 2000 11:25:43 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: bug with 5.004_04?
Message-Id: <8glmvn$ui1$1@216.155.32.231>
In article <jim3-C7F965.19052423052000@news.mntp1.il.home.com>, Jim
Thomason <jim3@psynet.net> wrote:
| I've determined that if you print @_, or otherwise refer to it in quotes
| ("@_") before making the assignment, it'll work just fine. Otherwise,
| handing off the pos call like that obviously doesn't work, in perl
| 5.004_04 at least.
|
| So, changing the subroutine to this:
|
| sub print_pos {
| "@_";
| my ($arg1, $arg2, $arg3) = @_;
| print "My arguments are ($arg1)($arg2)($arg3)\n";
| print "But I was handed (@_)\n";
| };
|
| will suddenly cause it to work perfectly in 5.004_04, with no other odd
| effects.
|
| Obviously, it appears to be a problem with 5.004_04, but I tend to like
| more detailed answers than that, so is anyone able to give me a more
| detailed idea about what's happening here?
I get the same result running your script under MacPerl 520r4
(essentially 5.004) so it's definitely a problem with that revision. I
don't have a more detailed answer for you but I can definitely confirm
the behaviour.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 26 May 2000 11:41:19 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Can't Knit Two Files Together
Message-Id: <zptX4.94344$hT2.389514@news1.rdc1.ct.home.com>
Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
> I was shocked! How could Dan Sugalski <dan@tuatha.sidhe.org>
> say such a terrible thing:
It was the Orbital Mind Control Lasers! They made me say it! :)
>>I think I'm missing something. If you're talking about this sort of thing:
[Snip]
> This has an off-by-one error. It should be:
Whups. Shows how often I write that sort of code. (And, in its own way, an
argument not to do it that way... :)
Dan
------------------------------
Date: Fri, 26 May 2000 12:00:58 GMT
From: jschand@my-deja.com
Subject: code fragment help
Message-Id: <8glp1j$pt$1@nnrp1.deja.com>
What does the qw() function do?
I have a slice of code that has:
use CGI qw(:nph);
I know it wants to utilize package CGI, but what is the functions
purpose?
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 26 May 2000 12:11:31 GMT
From: Ilja <billy@arnis-bsl.com>
Subject: Re: code fragment help
Message-Id: <8glpl9$17c$1@nnrp1.deja.com>
In article <8glp1j$pt$1@nnrp1.deja.com>,
jschand@my-deja.com wrote:
> What does the qw() function do?
>
> I have a slice of code that has:
>
> use CGI qw(:nph);
>
> I know it wants to utilize package CGI, but what is the functions
> purpose?
>
Please consult your local 'perldoc perlop' or
http://www.cpan.org/doc/manual/html/pod/perlop.html, section "Quote and
Quote-like Operators". Hope this helps. Ilja.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 26 May 2000 14:39:58 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: code fragment help
Message-Id: <392E709E.C2C11D7E@ife.ee.ethz.ch>
jschand@my-deja.com wrote:
>
> What does the qw() function do?
perldoc -f qw
See perldoc perldoc
- Alex
------------------------------
Date: 26 May 2000 10:51:04 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Exec() returned - Script exection Error
Message-Id: <8glkuo$rc3$0@216.155.32.231>
In article <4_EW4.3220$5Q.32845@news1.tor.primus.ca>, "Michael"
<passagewd@primus.ca> wrote:
| How can I learn to fix the problem if I don't ask experts like
| yourself... I
| am trying to learn but don't have a webmaster to ask.
|
|
| "Abigail" <abigail@arena-i.com> wrote in message
| news:8gf4do$e7v$2@news.panix.com...
| > On Tue, 23 May 2000 20:23:47 -0300, Michael <passagewd@primus.ca>
| > wrote:
| > ++ The error is:
| > ++
| > ++ Script execution error
| > ++ Unable to execute script due to a configuration problem.
| > ++ Please notify the webmaster of this error.
| > ++
| > ++ exec() returned: 2: No such file or directory
#!/usr/bin/perl -w
use strict;
use diagnostics -verbose; # only use this while testing.. it slows
# things down otherwise
use CGI::Carp qw(fatalsToBrowser);
#insert remainder of your script here.
#this may or may not give you more informative error msgs.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 26 May 2000 12:47:54 GMT
From: pgl@random.noc.clara.net (Peter Lowe)
Subject: Re: hashes vs associative arrays (was: Re: Array Question)
Message-Id: <slrn8issl9.10hr.pgl@random.noc.clara.net>
In article <Pine.GSO.4.10.10005241137050.14618-100000@user2.teleport.com>,
Tom Phoenix wrote:
>Well, if the term "associative array" actually tells you something, go
>ahead and say it. But it doesn't seem to tell me anything more than "hash"
>does. Either way, once you learn what it is, you probably won't want to
>keep using the long and awk-ward term. :-)
It's just that I already know what an array is - it's a list of
things (I now call arrays lists, btw). The term "associative
array" to me indicates that it's an array of associated items, eg:
1 => one
2 => two
3 -> three
...
When I first saw that kind of thing in the source code of someone's
Perl program, it all fit together - "ahh, associative... I see..."
You're right though, "hash" is shorter and it's what I use when
talking about hashes.
- Peter.
--
This is not the signature you are looking for. Move along now.
------------------------------
Date: Fri, 26 May 2000 12:10:52 +0200
From: frank <frank@french-connexion.com>
Subject: Html translation
Message-Id: <392E4DAC.C8C08FBF@french-connexion.com>
Hi all,
I'm looking for a script to help in tranlating html files :
it should look for >a string between two brackets in the original
language<, then print it, read the translation from input and write it
in the original file.
Maybe it should also check for end of lines to consider >this kind
of situation<
Any idea is welcome
Frank
------------------------------
Date: Fri, 26 May 2000 11:48:08 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: Re: Listing installed packages?
Message-Id: <8glo9j$31$1@nnrp1.deja.com>
>
> This lists *all* modules (tested), and shows you which are out of date
> with respect to your CPAN mirror:
>
> use CPAN;
>
> for $mod (CPAN::Shell->expand("Module", "/./")) {
> next unless $mod->inst_file;
> printf "%-40s %10s", $mod->id, $mod->inst_version;
> printf " *** %10s", $mod->cpan_version unless $mod->uptodate;
> print "\n";
> }
>
> (I stole this for the most part directly from the manpage. :)
>
Randal, thanks for suggesting this - it works - I'm running Perl
5.005_03. And I did find it in the manpage(man CPAN) as well.
> I think you can use $mod->cpan_file to get some interesting
information
> about where on the CPAN it is located, and if it's a Perl
distribution,
The "cpan_file" method works as well, but I couldn't find any
documentation on it. Where can I find documentation on all the methods
that are available? The only manpage I've found is the CPAN man page -
are there others?
> it's a standard. If it matches m{/perl-.*\.tar\.gz$}, it was probably
> part of some Perl distribution. If you get that working, let me know!
:)
>
Thanks again!
--
Hardy Merrill
Mission Critical Linux
http://www.missioncriticallinux.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 26 May 2000 10:15:11 GMT
From: csaba_r@my-deja.com (Csaba Raduly)
Subject: Re: Netscape w/ Perl
Message-Id: <8F4075D07quuxi@193.82.145.131>
26 May 2000: A formal bug report was sent to Seti@Home, because the
following message originated from bburton@cintek.com (Brian Burton) was
reported as containing signs of intelligence:
>Hey there, this question I know has probably been out there lots but I
>haven't easily found the answer.
>
>My scripts work good with Internet Explorer but with Netscape it just
>views the source. Does anyone know a solution?
>
>Thank ahead of time.. Brian
>
It's guessing time...
1. You're talking about a CGI, right ? In that case,
comp.infosystems.www.authoring.cgi might be a better place to ask.
2. Are you sending the right content-type ? Netscape believes you.
IExploder is known to ignore it and guess based on the extension.
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
Life is complex, with real and imaginary parts.
------------------------------
Date: Fri, 26 May 2000 14:58:32 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: newsgroup archives
Message-Id: <392E74F8.AA610119@bigfoot.com>
"Godzilla!" wrote:
>
> When you first arrive and, this is
> very hard to see with their poor
> choice in colors and layout, there
> is, upper right area, some whatever
> about looking for discussions or
> usenet. Can't remember and I cannot
> connect to deja vu right now. Anyhow,
> upper right, funny looking arrow thing
> which is a hot link. This will direct
> you into their search facility. Use,
That page is "www.deja.com/usenet".
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: Fri, 26 May 2000 10:19:02 GMT
From: vivekvp <vivekvp@spliced.com>
Subject: Pairing and Parsing DATA
Message-Id: <8glj2f$skd$1@nnrp1.deja.com>
Hello,
I have to sort and arrange some data from a file.
The data looks like this:
'ID,00/05/26,1,2,3,4,5,6,7,8,9,10,11,12,a,b,c,d,e,f,g,h,i,j,k,l"
What I have to do is sort the data and out put it like this:
ID
Date: 00/05/26
1 - a
2 - b
3 - c
4 - d
5 - e
6 - f
7 - g
8 - h
9 - i
10 - j
11 - k
12 - l
How do I parse and sort the data to make the numbers match up with the
letters?
Help!
Thanks!!
V
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 26 May 2000 14:03:56 +0200
From: "Thoren Johne" <thoren@southern-division.com>
Subject: Re: Pairing and Parsing DATA
Message-Id: <8glp9d$90m$13$1@news.t-online.com>
vivekvp <vivekvp@spliced.com> wrote in message
news:8glj2f$skd$1@nnrp1.deja.com...
> I have to sort and arrange some data from a file.
> The data looks like this:
> 'ID,00/05/26,1,2,3,4,5,6,7,8,9,10,11,12,a,b,c,d,e,f,g,h,i,j,k,l"
>
> What I have to do is sort the data and out put it like this:
>
> ID
> Date: 00/05/26
> 1 - a
> 2 - b
> 3 - c
> 4 - d
> 5 - e
> 6 - f
> 7 - g
> 8 - h
> 9 - i
> 10 - j
> 11 - k
> 12 - l
>
> How do I parse and sort the data to make the numbers match up with the
> letters?
supposing that your input always looks
this way and comes in pairs:
#!/usr/local/bin/perl -w
require 5.00503;
use strict;
my $input =
'ID,00/05/26,1,2,3,4,5,6,7,8,9,10,11,12,a,b,c,d,e,f,g,h,i,j,k,l';
my ($id, $date, @data) = split /,/, $input;
my $pairs = scalar @data / 2;
print "$id\n";
print "Date: $date\n";
print "$data[$_] - $data[$_ + $pairs]\n" for 0 .. $pairs - 1;
(special note to godzilla: uprade your Perl to a decent version, or
consider to pay for a Perl consultant if you are incapable to
compile your own version)
cheers
thoren
8#X
--
----------------------------------------------------------------------
Thoren Johne - 8#X - thoren@southern-division.com
Southern Division Classic Bikes - www.southern-division.com
------------------------------
Date: Fri, 26 May 2000 13:19:35 +0100
From: "Damon Jebb" <damon_jebb@nai.com>
Subject: Re: Pairing and Parsing DATA
Message-Id: <8glq58$hbl$1@new-news.na.nai.com>
Try splitting the string to an array of scalars. The first item of the
first set of the data is at $array[2] and the first item of the second set
is at $array[($SizeOfArray/2)+1]. Now loop through until the index of the
second item is at the end of the array. Getting the ID and date is simple.
I'll leave writing that in code for you to work out ;0)
HTH
Damon
vivekvp <vivekvp@spliced.com> wrote in message
news:8glj2f$skd$1@nnrp1.deja.com...
>
>
> Hello,
>
> I have to sort and arrange some data from a file.
>
> The data looks like this:
>
> 'ID,00/05/26,1,2,3,4,5,6,7,8,9,10,11,12,a,b,c,d,e,f,g,h,i,j,k,l"
>
> What I have to do is sort the data and out put it like this:
>
> ID
> Date: 00/05/26
> 1 - a
> 2 - b
> 3 - c
> 4 - d
> 5 - e
> 6 - f
> 7 - g
> 8 - h
> 9 - i
> 10 - j
> 11 - k
> 12 - l
>
> How do I parse and sort the data to make the numbers match up with the
> letters?
>
> Help!
>
> Thanks!!
>
> V
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Fri, 26 May 2000 10:05:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl unusable as a programming language
Message-Id: <393145cb.9083276@news.skynet.be>
Larry Rosler wrote:
>A company selling commercial software products (Micro$..t excepted, of
>course :-) can -- and usually does -- impose quality criteria and
>metrics on its employees. But not on volunteers.
The committee (?) can reject contributions that they consider of too low
quality.
Is the difference so fundamental?
--
Bart.
------------------------------
Date: 25 May 2000 23:15:01 GMT
From: Tushar Samant <Tbone@pimpdaddy.com>
Subject: Re: Perl unusable as a programming language
Message-Id: <8gkc5l$2a3o$1@news.enteract.com>
simon@brecon.co.uk writes:
>I think Ilya's beef is with the lack of formal definition of the
>language.
I would say his beef is with incomplete or vague documentation. Which
might mean the same thing--but, as you said, it's about what impression
you want to make. "Lack of formal definition" sounds almost cool.
------------------------------
Date: Fri, 26 May 2000 13:08:46 +0200
From: "Seansan" <sean77@dds.nl>
Subject: ref-to-glob error (*in)
Message-Id: <392e5b16$0$6810@reader4.casema.net>
I dont understand this next line.
I mean the star next to in (*in)
I use it in a library file, but saw it somewhere and
wondered why they use it.
what does it mean ??
my (*in) = shift if @_; # CGI input
------------------------------
Date: Fri, 26 May 2000 14:10:34 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: ref-to-glob error (*in)
Message-Id: <392E69BA.8304DE39@ife.ee.ethz.ch>
Seansan wrote:
>
> I dont understand this next line.
> I mean the star next to in (*in)
> I use it in a library file, but saw it somewhere and
> wondered why they use it.
> what does it mean ??
>
> my (*in) = shift if @_; # CGI input
It means it doesn't work. You can't define a lexical glob. See the end
of perldata
Generally the construct was used to pass filehandles, see perldata.
Also see FileHandle for alternative ways.
- Alex
------------------------------
Date: 26 May 2000 10:12:01 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Should be in FAQ: "I can't find Net::SMTP"
Message-Id: <959335682.11767@itz.pp.sci.fi>
In article <8gksl7$qvk@netnews.hinet.net>, John Lin wrote:
>I have been asked this question for many times.
>
>"I can't find Net::SMTP module in CPAN."
>
>Actually, we should redirect them to look for "libnet" instead, right?
>Can we put this answer in the FAQ?
Would they find the answer in the FAQ, then? What we really need IMHO
is a prominent notice on the CPAN front page saying that the best way
to find a particular module is through "search.cpan.org".
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: 26 May 2000 10:54:11 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Split a number up?
Message-Id: <8gll4j$rc3$1@216.155.32.231>
In article
<Pine.GSO.4.21.0005231619010.20735-100000@mtwhitney.nsc.com>, Steven
Kuo x7914 <skuo@mtwhitney.nsc.com> wrote:
| my (@num) = $number =~ /\G(\d{2})/g;
this got a long look from me, followed by the profoundly uttered : "no
shit!"
thanks! :)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 26 May 2000 10:54:47 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Split a number up?
Message-Id: <8gll5n$rc3$2@216.155.32.231>
In article <MPG.1394b7507749a70f98aac5@nntp.hpl.hp.com>, Larry Rosler
<lr@hpl.hp.com> wrote:
| my @num = $number =~ /\d{1,2}/g;
aha! even MORE interesting. Thanks Larry!
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 26 May 2000 12:14:59 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: system commands
Message-Id: <Pine.GHP.4.21.0005261214140.508-100000@hpplus01.cern.ch>
On Fri, 26 May 2000, LostSailor wrote:
> Please email me personally.
Why? You don't even have a Perl question.
------------------------------
Date: Fri, 26 May 2000 14:52:19 +0100
From: Frederic Hoerni <fhoerni@intelcom.fr>
Subject: time and date conversion
Message-Id: <392E8193.3AD2EB79@intelcom.fr>
hello,
i want to convert a date to the internal time format (number of seconds
since 01/01/1970).
INPUT : 05/26/2000 12:25:34
OUTPUT : number of seconds since 01/01/1970
(it is the opposite of localtime ())
what function does this ?
Thanks for your help
Frédéric Hoerni
e-mail : fhoerni @ intelcom.fr
------------------------------
Date: Fri, 26 May 2000 14:57:21 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: updated : Re: regexes *sigh* damn I hate these things
Message-Id: <392E74B1.B44521E3@bigfoot.com>
"Godzilla!" wrote:
> Telling ya Mr. Dragon, good old Perl 4 makes this
> so simple and easy!
Please clarify this - are you running your Perl code in a Perl5
interpreter under Solaris?
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: 26 May 2000 10:35:49 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: use english
Message-Id: <8glk25$op0$0@216.155.32.231>
In article
<Pine.GSO.4.21.0005231755490.9692-100000@dataserv.libs.uga.edu>, Brad
Baxter <bmb@dataserv.libs.uga.edu> wrote:
| On Tue, 23 May 2000, Michael Carman wrote:
| ...
| > For one, the long names are there for a reason -- they're descriptive
| > and easier to remember than secret code of $!^*& stuff. What you use in
| ...
|
| 1 #!/usr/local/bin/perl -w
| 2 use strict;
| 3
| 4 print $!^*&;
| 5
| 6 __END__
| 7 Output:
| 8
| 9 *main::&
results in:
e(plus three undisplayable chars)NSIn not supported on socket
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Fri, 26 May 2000 13:44:40 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: use english
Message-Id: <392E63A8.50CD402B@ife.ee.ethz.ch>
The WebDragon wrote:
>
> In article
> <Pine.GSO.4.21.0005231755490.9692-100000@dataserv.libs.uga.edu>, Brad
> Baxter <bmb@dataserv.libs.uga.edu> wrote:
>
> | On Tue, 23 May 2000, Michael Carman wrote:
> | ...
> | > For one, the long names are there for a reason -- they're descriptive
> | > and easier to remember than secret code of $!^*& stuff. What you use in
> | ...
> |
> | 1 #!/usr/local/bin/perl -w
> | 2 use strict;
> | 3
> | 4 print $!^*&;
> | 5
> | 6 __END__
> | 7 Output:
> | 8
> | 9 *main::&
>
> results in:
> e(plus three undisplayable chars)NSIn not supported on socket
Not correct. There are four undisplayable chars (035 004 033 017)
This is because $! contained an error (Operation not supported on
socket)
before you called the print line
- Alex
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 3173
**************************************