[21956] in Perl-Users-Digest
Perl-Users Digest, Issue: 4178 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 26 09:05:40 2002
Date: Tue, 26 Nov 2002 06:05:09 -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 Tue, 26 Nov 2002 Volume: 10 Number: 4178
Today's topics:
File::Basename::fileparse: Problem extracting file part (Ronald Fischer)
Re: ftp - forking. <simon.oliver@umist.ac.uk>
Re: Help writing simple script <congers@yoeric.com>
IP and Host differences (Marc Rasell)
Re: IP and Host differences <robertbu@hotmail.com>
matching a pattern from a text file into a Hash. (NF)
Re: matching a pattern from a text file into a Hash. <kurzhalsflasche@netscape.net>
Re: matching a pattern from a text file into a Hash. <Niall.Fallon@xilinx.com>
Re: matching a pattern from a text file into a Hash. <kurzhalsflasche@netscape.net>
Re: matching a pattern from a text file into a Hash. (Helgi Briem)
Re: mozilla & netscape. incapable of CSS word-break ? <ahj6@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? <ian@WINDOZEdigiserv.net>
Re: mozilla & netscape. incapable of CSS word-break ? <ahj6@hotmail.com>
Order of return trap <eighner@io.com>
Re: Order of return trap <tassilo.parseval@post.rwth-aachen.de>
Re: Perl Books (Randal L. Schwartz)
Re: perlcc and perl modules <ian@WINDOZEdigiserv.net>
Re: perlcc and perl modules (Helgi Briem)
the system command and parameters (Windows). <skerschhofer@yahoo.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Nov 2002 04:54:50 -0800
From: ronaldf@eml.cc (Ronald Fischer)
Subject: File::Basename::fileparse: Problem extracting file part
Message-Id: <219750c.0211260454.4b5f9870@posting.google.com>
I would like to split a filename at the rightmost 'dot' position. i.e.
ab/cd/ef.gh.ij
should be split into
ab/cd ef.gh and ij
I have problems writing the correct pattern for the fileparse
function: They always split
to the first dot:
print ((fileparse('ab/cd/ef.gh.ij','[.].+?'))[0],"\n");
outputs
ef
and not, as I had hoped,
ef.gh
I used non-greedy pattern matching, to consume the smallest amount of
characters for the
extension. IMO, this should be the correct way to do this. Am I wrong?
In case you wonder:
I have also tried the greedy pattern '[.].+', but it gives the same
result (Of course, this is
what I would expect in the greedy case,....).
Ronald
------------------------------
Date: Tue, 26 Nov 2002 12:54:21 +0000
From: Simon Oliver <simon.oliver@umist.ac.uk>
Subject: Re: ftp - forking.
Message-Id: <3DE36EFD.6000702@umist.ac.uk>
test wrote:
> may be forking is not the right term as i'm just a novice.
> i have perl script that transfers a file about 4MB in size
> for managing a server farm. it takes about 20 minutes for
> the script to generate additional scripts and ftp out the
> file.
>
> instead of simply executing this in sequential mannner
> i would like to initiate ftp for about 50 boxes and kick
> off the new ones as and when the running ones finish.
>
> i have never done this before. so any information as to how
> to make this happen is appreciated.
>
> if there are any modules out there in CPAN that can make
> my work easier, if you could let me know i will check them out.
>
You will not get much response from comp.lang.perl.* since this is a
conceptual problem rather than a perl problem.
My recommendation would be to run a script on each box that starts the local
jobs. The script would wait for a job to finish then request another job
from from a master list.
Look at using Net::Daemon for creating your list server and client applications.
--
Simon Oliver
------------------------------
Date: Tue, 26 Nov 2002 08:00:23 -0500
From: "Susan G. Conger" <congers@yoeric.com>
Subject: Re: Help writing simple script
Message-Id: <congers-C99E2D.08002326112002@news.uswest.net>
In article <slrnau60u3.ojg.damian@puma.qimr.edu.au>,
damian@qimr.edu.au (Damian James) wrote:
> On Mon, 25 Nov 2002 23:07:45 -0500, Susan G. Conger said:
> >...
> >I tried this but I am still having problems. There are a couple of
> >things that are different. Basially the comment characters are /* */
> >not #. So here is what I have in a file that I can call.
> >
> >#!/usr/bin/perl -pi
> > s/^//*# define QE_MAC_GCC310*///# define QE_MAC_GCC310$1/g;s/^# define
> >QE_MAC_CW83_102///*# define QE_MAC_CW83_102*// $1/g;
>
> Well, that would be:
>
> #!/usr/bin/perl -lpi
> s{^/\*(# define QE_MAC_GCC310)\*/}{$1}g;
> s{^(# define QE_MAC_CW83_102)}{/* $1 */}g;
>
> But a real script would be much more verbose/readable :-).
> Note that this will fail if the comments go over more than
> one line.
>
> --damian
Thanks Damian! It works like a champ. I am using it to switch
development environments on the Mac. We use imake to build all the
code. There is one file where depending on the define we select the GCC
compiler or the CodeWarrior command line tools. So I just say gcccomp
(that runs perl command) and my environment is setup for GCC and when I
want to change to CodeWarrior I do cwcomp (reverse of gcccomp).
Thanks again for your help,
Susan
--
============================================================
Susan G. Conger Custom Windows & Macintosh Development
President Web Site Design & Development
YOERIC Corporation Database Design & Development
256 Windy Ridge Road
Chapel Hill, NC 27517
Phone/Fax: (919)542-0071
email: congers@yoeric.com Web: www.yoeric.com
------------------------------
Date: 26 Nov 2002 04:00:38 -0800
From: mrasell@hotmail.com (Marc Rasell)
Subject: IP and Host differences
Message-Id: <df4cdf85.0211260400.389d4269@posting.google.com>
I'm working on a hit counter. In the logs I record date, IP and Host.
Sometimes I can get the same IP and Date with a different Host name.
I'm running the counter to records unique IP and Host per day. Would a
different Host indicate with the same IP address on the same day
indicate a new visitor? Why does the Host change? I thought IP and
Host were supposed to be linked together?
------------------------------
Date: Tue, 26 Nov 2002 13:59:20 GMT
From: "robertbu" <robertbu@hotmail.com>
Subject: Re: IP and Host differences
Message-Id: <Y6LE9.587$qe.199@nwrddc03.gnilink.net>
"Marc Rasell" <mrasell@hotmail.com> wrote in message
news:df4cdf85.0211260400.389d4269@posting.google.com...
> I'm working on a hit counter. In the logs I record date, IP and Host.
> Sometimes I can get the same IP and Date with a different Host name.
> I'm running the counter to records unique IP and Host per day. Would a
> different Host indicate with the same IP address on the same day
> indicate a new visitor? Why does the Host change? I thought IP and
> Host were supposed to be linked together?
The requests are probably from private network, and what you are seeing is
the gateway address. Four example, there are four computers in our
household with unique internal IP addresses all sharing a single external IP
address.
== Rob ==
------------------------------
Date: 26 Nov 2002 03:16:55 -0800
From: nfallon@xilinx.com (NF)
Subject: matching a pattern from a text file into a Hash.
Message-Id: <d1686fc3.0211260316.e6281ce@posting.google.com>
I'm new to Perl.
I need to match a string pattern read in from a file like A_BCDEF or
AB_CDEF.
I also need to get the next string in the file which is a decimal
0.101 1.111.
I want to push these into a Hash.
I then perform this on another file and compare the decimal values of
the same string pattern from each file.
I'm presently trying to use split like this
my ( $item, @list ) = split(/\w_\w*/ , $_ );
push @{ $hash{$item}} , \@list; # push ARRAY,LIST
I cannot seem to pattern in split correct.
------------------------------
Date: Tue, 26 Nov 2002 12:43:54 +0100
From: Dominik Seelow <kurzhalsflasche@netscape.net>
Subject: Re: matching a pattern from a text file into a Hash.
Message-Id: <3DE35E7A.6090608@netscape.net>
Recently, NF told us:
> I'm new to Perl.
> I need to match a string pattern read in from a file like A_BCDEF or
> AB_CDEF.
> I also need to get the next string in the file which is a decimal
> 0.101 1.111.
> I want to push these into a Hash.
> I then perform this on another file and compare the decimal values of
> the same string pattern from each file.
>
> I'm presently trying to use split like this
>
> my ( $item, @list ) = split(/\w_\w*/ , $_ );
> push @{ $hash{$item}} , \@list; # push ARRAY,LIST
^ that's an array reference
>
> I cannot seem to pattern in split correct.
Apparently you're not sure whether to use a regular expression or to
split - and try do both.
If your string is
'A_BCDEF 0.101 1.111 2.55 0.432'
you should write
my ($item, @list) = split / /;
This will work:
#!perl -w
use strict;
my %hash;
$_='A_BCDEF 0.101 1.111 2.55 0.432';
my ($item, @list) = split / /;
push @{$hash{$item}}, @list;
print join (',',@{$hash{A_BCDEF}});
HTH,
Dominik
------------------------------
Date: Tue, 26 Nov 2002 12:13:55 +0000
From: Niall Fallon <Niall.Fallon@xilinx.com>
To: Dominik Seelow <kurzhalsflasche@netscape.net>
Subject: Re: matching a pattern from a text file into a Hash.
Message-Id: <3DE36583.33B4BBF7@xilinx.com>
This is a multi-part message in MIME format.
--------------D65A6DEE91B702CF0CDB05BB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cheers Dominik,
But the strings I am extracting from the file could be any combimation of
letters and numbers with an _ i.e. A_BCD , A_DCM, AD_DSDSDD etc.
So I need to have a pattern match in the split function to match any of
these possibilities.
I also want split to return the complete string.
I also want the first occurance of a decimal after the string.
I want to insert the string and the decimal into the Hash.
e.g.
The text file could be
A_BCDEF 100.203 4000.33 12.56
A_BDFEF 13.203 43.33 12.36
AD_BCDEF 100.203 4000.33 12.56
..
ADC_BDFEF 13.203 43.33 12.36
And all I want is all the strings of Letters and the first instance of the
decimal for each string.
i.e.
A_BCDEF 100.203
A_BDFEF 13.203
AD_BCDEF 100.203
..
ADC_BDFEF 13.203
in a Hast table.
Dominik Seelow wrote:
> Recently, NF told us:
> > I'm new to Perl.
> > I need to match a string pattern read in from a file like A_BCDEF or
> > AB_CDEF.
> > I also need to get the next string in the file which is a decimal
> > 0.101 1.111.
> > I want to push these into a Hash.
> > I then perform this on another file and compare the decimal values of
> > the same string pattern from each file.
> >
> > I'm presently trying to use split like this
> >
> > my ( $item, @list ) = split(/\w_\w*/ , $_ );
> > push @{ $hash{$item}} , \@list; # push ARRAY,LIST
> ^ that's an array reference
>
> >
> > I cannot seem to pattern in split correct.
>
> Apparently you're not sure whether to use a regular expression or to
> split - and try do both.
>
> If your string is
> 'A_BCDEF 0.101 1.111 2.55 0.432'
> you should write
> my ($item, @list) = split / /;
>
> This will work:
>
> #!perl -w
> use strict;
> my %hash;
> $_='A_BCDEF 0.101 1.111 2.55 0.432';
> my ($item, @list) = split / /;
> push @{$hash{$item}}, @list;
> print join (',',@{$hash{A_BCDEF}});
>
> HTH,
> Dominik
--------------D65A6DEE91B702CF0CDB05BB
Content-Type: text/x-vcard; charset=us-ascii;
name="Niall.Fallon.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Niall Fallon
Content-Disposition: attachment;
filename="Niall.Fallon.vcf"
begin:vcard
n:Fallon;Niall
tel;work:127
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:nfallon@xilinx.com
fn:Niall Fallon
end:vcard
--------------D65A6DEE91B702CF0CDB05BB--
------------------------------
Date: Tue, 26 Nov 2002 13:43:57 +0100
From: Dominik Seelow <kurzhalsflasche@netscape.net>
Subject: Re: matching a pattern from a text file into a Hash.
Message-Id: <3DE36C8D.2090308@netscape.net>
Recently, Niall Fallon told us:
> Cheers Dominik,
> But the strings I am extracting from the file could be any combimation of
> letters and numbers with an _ i.e. A_BCD , A_DCM, AD_DSDSDD etc.
> So I need to have a pattern match in the split function to match any of
> these possibilities.
> I also want split to return the complete string.
> I also want the first occurance of a decimal after the string.
> I want to insert the string and the decimal into the Hash.
> e.g.
> The text file could be
> A_BCDEF 100.203 4000.33 12.56
> A_BDFEF 13.203 43.33 12.36
> AD_BCDEF 100.203 4000.33 12.56
> ..
> ADC_BDFEF 13.203 43.33 12.36
>
> And all I want is all the strings of Letters and the first instance of the
> decimal for each string.
> i.e.
> A_BCDEF 100.203
> A_BDFEF 13.203
> AD_BCDEF 100.203
> ..
> ADC_BDFEF 13.203
>
> in a Hast table.
>
if you don't want to use 'split'...:
#!perl -w
use strict;
my %hash;
foreach ('A_BCDEF 100.203 4000.33 12.56',
'A_BDFEF 13.203 43.33 12.36',
'AD_BCDEF 100.203 4000.33 12.56'){
$hash{$1}=$2 if /(\w+)\s+(\d+\.*\d+)/;
}
print join ("\n",%hash);
Later,
Dominik
------------------------------
Date: Tue, 26 Nov 2002 13:10:53 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: matching a pattern from a text file into a Hash.
Message-Id: <3de37291.3578510205@news.cis.dfn.de>
On Tue, 26 Nov 2002 12:13:55 +0000, Niall Fallon
<Niall.Fallon@xilinx.com> wrote:
>This is a multi-part message in MIME format.
Don't do that. Usenet is a text-only medium.
For guidelines on how to post to comp.lang.perl.misc see:
http://mail.augustmail.com/~tadmc/clpmisc.shtml
For more information about netiquette in general, see
the "Netiquette Guidelines" at:
http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
--
Regards, Helgi Briem
helgi AT decode DOT is
A: Top posting
Q: What is the most irritating thing on Usenet?
- "Gordon" on apihna
------------------------------
Date: Tue, 26 Nov 2002 20:10:00 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <arvjan$qon$1@news1.kornet.net>
"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:8dk6uugeraaogoi12mdurfjepp9s3c3798@4ax.com...
> In a fit of excitement on Tue, 26 Nov 2002 16:18:42 +0900, "Hyungjin
> Ahn" <ahj6@hotmail.com> managed to scribble:
> > "J?gen Exner" <jurgenex@hotmail.com> wrote in message
> > news:%6FE9.29077$hi6.11236@nwrddc02.gnilink.net...
> > > Hyungjin Ahn wrote:
> > > [...]
> > > > Though I resolved the problem myself, I still want to know
> > > > whether someone already made cool script to make word-break
> > > > availble in mozilla & navigator.
> > >
> > > And in which way would this be related to Perl exactly?
> >
> > 'cool script' means 'well-operating perl source or module'.
> >
>
> But my 'cool script' was written in PHP.. so your point being?
> 'cool script' has no reference to _ANY_ language whatsoever, unless
> specified.
I think I'm posting to comp.lang.perl.misc newsgroup, not to
comp.lang.any_language_whatsoever newsgroup.
If you want to share your 'cool script' written in PHP, you'd better visit
php newsgroup and find someone who seeks 'cool script' in the very PHP
newsgroup.
anyway, thanks for your reply. -Hyungjin Ahn(ahj6@hotmail.com)
> Regards,
>
> Ian
------------------------------
Date: Tue, 26 Nov 2002 11:32:21 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <9tm6uusgi863t59e525gmed0k0cf7jcn3f@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Tue, 26 Nov 2002 20:10:00 +0900, "Hyungjin
Ahn" <ahj6@hotmail.com> managed to scribble:
[snip]
> > > 'cool script' means 'well-operating perl source or module'.
> > >
> >
> > But my 'cool script' was written in PHP.. so your point being?
> > 'cool script' has no reference to _ANY_ language whatsoever, unless
> > specified.
>
> I think I'm posting to comp.lang.perl.misc newsgroup, not to
> comp.lang.any_language_whatsoever newsgroup.
Correct.
> If you want to share your 'cool script' written in PHP, you'd better
> visit php newsgroup and find someone who seeks 'cool script' in the
> very PHP newsgroup.
Sir, are you _deliberately_ ignorant? or just plain stupid?
You tell me where 'cool script' defines a Perl issue, and I'll agree
with you, until then, I'd recommend you go and code in VBS or
something, as you obviously fail to even realise what Perl is.
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPeNcEWfqtj251CDhEQL/KgCbBBTsULsyXRSvi7P0WE5osF3SUY4AmwfR
8x08+Q8Mb2S9FemJThFxuD90
=mvzP
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: Tue, 26 Nov 2002 21:29:01 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <arvnus$pa$1@news1.kornet.net>
"Ian.H [dS]" <ian@WINDOZEdigiserv.net> wrote in message
news:9tm6uusgi863t59e525gmed0k0cf7jcn3f@4ax.com...
> In a fit of excitement on Tue, 26 Nov 2002 20:10:00 +0900, "Hyungjin
> Ahn" <ahj6@hotmail.com> managed to scribble:
> > If you want to share your 'cool script' written in PHP, you'd better
> > visit php newsgroup and find someone who seeks 'cool script' in the
> > very PHP newsgroup.
> Sir, are you _deliberately_ ignorant? or just plain stupid?
> You tell me where 'cool script' defines a Perl issue, and I'll agree
> with you, until then, I'd recommend you go and code in VBS or
> something, as you obviously fail to even realise what Perl is.
If you mean the subject 'differences between perl & Perl' in FAQ, I
completely read.
I don't care about differentiating perl from Perl, of course do not use as
"awk & Perl" and "Phython & perl".
Do you want to argue on a word 'script'?
'script' means nothing but 'script' itself. If you regarded 'script' as 'VBS
or something',
in this case, what kind of FAQ do you refer?
Is there any difference between "Script & script"?
Larry told about "differences between perl & Perl".
And do you want to define "Script & script"? Even though you will define it,
I don't care about your opinion.
I'd recommend you go and open dictionary for 'script'.
thanks for your recommend, but I don't deal with VBS as well as
PHP. -Hyungjin Ahn(ahj6@hotmail.com)
> Regards,
> Ian
------------------------------
Date: Tue, 26 Nov 2002 06:32:58 -0600
From: Lars Eighner <eighner@io.com>
Subject: Order of return trap
Message-Id: <slrnau6qf8.2aoh.eighner@dumpster.io.com>
It appears to me that if you return an array and a
reference, the array will swallow the reference (or
something).
I have just spent three horrible days convinced I could
not learn what a hash of a hash is or how to dereference
one. I knocked my head against perlref and perldsc for
days. Here are the simplified examples which finally
revealed the problem to me. Is it a bug in perl or a bug in
me?
broke.pl:
#!/usr/bin/perl
$ref = &MakeHash;
print $ref->{a} . "\n";
($what, @ray, $aref ) = &MakeHoH; #broke - @ray is before $aref.
print "$ray[1]\n";
print "$what\n";
print $aref->{1}->{a} ."\n";
sub MakeHash {
$ahash{a} = "foo";
$ahash{b} = "bar";
$ahash{c} = "car";
$ahash{d} = "dar";
return \%ahash;
};
sub MakeHoH {
$HoH{1}{a}="foo";
$HoH{1}{b}="bar";
$HoH{1}{c}="goat";
$HoH{2}{a}="cat";
$HoH{2}{b}="mat";
$HoH{2}{c}="hat";
$HoH{3}{a}="frog";
$aname = \%HoH;
print $aname->{2}->{b} , "\n";
$grim = "bug";
$array[1] = "a pig";
$array[2] = "a dog";
$array[3] = "a hen";
return ($grim, @array, $aname );
}
--end broke.pl
fixed.pl
#!/usr/bin/perl
$ref = &MakeHash;
print $ref->{a} . "\n";
($what, $aref, @ray ) = &MakeHoH; #fixed - $aref is before @ray
print "$ray[1]\n";
print "$what\n";
print $aref->{1}->{a} ."\n";
sub MakeHash {
$ahash{a} = "foo";
$ahash{b} = "bar";
$ahash{c} = "car";
$ahash{d} = "dar";
return \%ahash;
};
sub MakeHoH {
$HoH{1}{a}="foo";
$HoH{1}{b}="bar";
$HoH{1}{c}="goat";
$HoH{2}{a}="cat";
$HoH{2}{b}="mat";
$HoH{2}{c}="hat";
$HoH{3}{a}="frog";
$aname = \%HoH;
print $aname->{2}->{b} , "\n";
$grim = "bug";
$array[1] = "a pig";
$array[2] = "a dog";
$array[3] = "a hen";
return ($grim, $aname, @array );
}
--end fixed.pl
--
Lars Eighner -finger for geek code- eighner@io.com http://www.io.com/~eighner/
War on Terrorism: Treat Readers like Mushrooms
"If the story needs rewriting to play down the civilian casualties, DO IT."
-Memo, _Panama City_ (FL) _News Herald_
------------------------------
Date: 26 Nov 2002 13:56:17 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: Order of return trap
Message-Id: <arvui1$lfj$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Lars Eighner:
> It appears to me that if you return an array and a
> reference, the array will swallow the reference (or
> something).
>
> I have just spent three horrible days convinced I could
> not learn what a hash of a hash is or how to dereference
> one. I knocked my head against perlref and perldsc for
> days. Here are the simplified examples which finally
> revealed the problem to me. Is it a bug in perl or a bug in
> me?
I'd say rather a bug in you. :-)
I am shortening your examples a little:
# broken
($what, @ray, $aref) = MakeHoh();
sub MakeHoH {
...
return ($grim, @array, $aname );
}
What happens here? $what becomes $grin and @ray becomes @array _and_
$aname. The reason is in the way Perl passes its arguments around. When
you pass arguments into a subroutine and out of it (via return) then
Perl always uses a list for it.
Consider:
$grim = "string";
@array = (1, 2, 3);
$aname = "name";
Perl returns:
("string", 1, 2, 3, "name)
If you assign, the following happens:
($what, @ray, $aref) = ("string", 1, 2, 3, "name");
^------|----------------| `-------------'
^------------------------------|
$what eats "string" and then @ray (an array, potentially with infinite
length) eats all other arguments in the list. That means, $aref will
always be undefined.
Whereas, if you rearrange the arguments in your working example, this
happens:
($what, $aref, @ray) = ("string", "name", 1, 2, 3);
^------|------|----------| | `-----'
^------|------------------| |
^---------------------------|
[ sorry, I am not very good at ascii art ]
Solution is therefore to turn a list-ish structure (a hash and an array)
into a scalar by using references:
($what, $ray_ref, $aref) = MakeHoh();
@ray = @{ $ray_ref };
sub MakeHoh {
...
return ($scalar, \@array, $ref);
}
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: 26 Nov 2002 06:00:55 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: "Andrew Harton" <andrew_harton@agilent.com>
Subject: Re: Perl Books
Message-Id: <86n0nw2zxk.fsf@red.stonehenge.com>
>>>>> "Andrew" == Andrew Harton <andrew_harton@agilent.com> writes:
Andrew> PerlFAQ Server wrote:
>>
>> 2.11: Perl Books
>>
>>
Andrew> At the risk of being called pedantic, 'Perl Books' isn't a
Andrew> question. Since virtually everything else in the FAQ is
Andrew> expressed as a question, this probably should be too - "Which
Andrew> books are recommended for learning Perl?", for example.
Well, you could just add a question mark:
2.11: Perl Books?
:-)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 26 Nov 2002 11:34:48 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: perlcc and perl modules
Message-Id: <j1n6uus5l7jlgo5os14uilup64pv1t7f86@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Tue, 26 Nov 2002 11:02:32 GMT,
helgi@decode.is (Helgi Briem) managed to scribble:
> On 25 Nov 2002 17:05:01 -0800, princccess@aol.com (Return
> Jasmin) wrote:
>
> >When you compile with perlcc, is there anyway to find out what
> >standard perl modules were used? I need to find out what's included
> >in the executable you get after compiling with perlcc. Can anyone
> >help me out on this? Thanks in advance!
>
> If you actually manage to compile a working executable
> with perlcc, let alone include modules, you get a big
> prize.
>
> Has anyone ever managed to get that thing to work?
I did with something (I forget now) but it didn't include any modules.
I was hoping to compile something which included the File::Find module,
but alas as you state... it was not a job well done. I also found that
Perl2Exe (for windoze) works very well in most cases, except when
including modules, which to me, makes it somewhat useless for any real
usable script.. or a _lot_ of work to code "around" using a module.
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPeNcqGfqtj251CDhEQIg9wCfSnKjcHrdEC9peY0dTXYvySnANVsAn3fl
B8POxLz8BSsTVEt84RqXYrQv
=/Axy
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: Tue, 26 Nov 2002 13:09:26 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: perlcc and perl modules
Message-Id: <3de37216.3578387819@news.cis.dfn.de>
On Tue, 26 Nov 2002 11:34:48 GMT, "Ian.H [dS]"
<ian@WINDOZEdigiserv.net> wrote:
>> Has anyone ever managed to get that thing to work?
>
>I did with something (I forget now) but it didn't include any modules.
>
>I was hoping to compile something which included the File::Find module,
>but alas as you state... it was not a job well done. I also found that
>Perl2Exe (for windoze) works very well in most cases, except when
>including modules, which to me, makes it somewhat useless for any real
>usable script.. or a _lot_ of work to code "around" using a module.
I have written lots of programs utlising modules and
packed them successfully using perl2exe. In fact I
don't think I have ever written a real program that
didn't use modules. Why should that be a problem?
The manual tells you *precisely* how to do it.
--
Regards, Helgi Briem
helgi AT decode DOT is
A: Top posting
Q: What is the most irritating thing on Usenet?
- "Gordon" on apihna
------------------------------
Date: Tue, 26 Nov 2002 12:16:00 +0100
From: "Sascha Kerschhofer" <skerschhofer@yahoo.de>
Subject: the system command and parameters (Windows).
Message-Id: <arvl5h$28j$1@news.mch.sbs.de>
Hi,
I have the problem, that, the system command seems to behave different on
diverse windows installations (but it is all Windows 2000 - one english and
one german version):
to want to execute
msxsl.exe file1.xml file1.xsl -xw > file1.htm filename=000001
and I call
system("msxsl.exe $file.h.xml file1.xsl -xw >
$file.htm","filename=$the_filename");
on my system, it performs well, on other system, the second element of the
LIST (which is 'filename=$the_filename') causes an error as "The system
cannot find the path specified."
If I remove the second element of the LIST, it runs as it should. What am I
doing wrong, or has windows commandshell it's secrets?
Sascha
------------------------------
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 4178
***************************************