[16637] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4049 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 17 18:10:48 2000

Date: Thu, 17 Aug 2000 15:10:31 -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: <966550231-v9-i4049@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 17 Aug 2000     Volume: 9 Number: 4049

Today's topics:
        I have another question pape_98@my-deja.com
    Re: I have another question <care227@attglobal.net>
    Re: I have another question <russ_jones@rac.ray.com>
    Re: iis4 path (David H. Adler)
    Re: Large Pieces of Code mr_curmudgeon@my-deja.com
    Re: Mail processing (Keith Calvert Ivey)
    Re: Mail processing <kjetilskotheim@iname.com>
        mkdir problem!! hallian@hotmail.com
    Re: mkdir problem!! (Greg Bacon)
        More Parse::RecDescent questions. <ocschwar@mit.edu>
        Moving CPAN Modules from Windows NT to Linux <declan@chello.nl>
        Net::SMTP SIZE from EHLO command <antsyp@my-deja.com>
    Re: Open a new process for read AND write (Greg Bacon)
    Re: Open a new process for read AND write (Teodor Zlatanov)
    Re: Out of memory! error. Working with arrays... <jeff@vpservices.com>
    Re: Out of memory! error. Working with arrays... <bkennedy@hmsonline.com>
    Re: Out of memory! error. Working with arrays... <samara_biz@hotmail.com>
    Re: Out of memory! error. Working with arrays... <samara_biz@hotmail.com>
    Re: Out of memory! error. Working with arrays... <bkennedy@hmsonline.com>
    Re: Output to printer in Win NT (Malcolm Dew-Jones)
    Re: perl 5.6 <russ_jones@rac.ray.com>
    Re: perl 5.6 <doughera@lafayette.edu>
    Re: perl 5.6 (Abigail)
    Re: Perl code for a newbie!! (David H. Adler)
    Re: Perl code for a newbie!! (David H. Adler)
    Re: Perl code for a newbie!! (Keith Calvert Ivey)
    Re: Perl code for a newbie!! <lr@hpl.hp.com>
    Re: Perl code for a newbie!! <care227@attglobal.net>
    Re: Perl code for a newbie!! (Greg Bacon)
        porting send.pl to linux from a solaris system computertech@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 17 Aug 2000 19:36:43 GMT
From: pape_98@my-deja.com
Subject: I have another question
Message-Id: <8nhes8$j3l$1@nnrp1.deja.com>

I have 1 final question.
Now that I know how to sort correctly how do u implement a function
calls a file and then sorts its contents.
would it be something like this:

use strict;
use vars qw(@unsorted @sorted $a $b);

open ('/applications/apache/cgi-bin/pape/number') or die "Can't open
file: $!\n";

my @unsorted;

@sorted = sort { $a <=> $b } @unsorted;

u can tell i'm new at this can't you???


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 17 Aug 2000 16:06:55 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: I have another question
Message-Id: <399C45DF.93383AA3@attglobal.net>

pape_98@my-deja.com wrote:
> 
> Now that I know how to sort correctly how do u implement a function
> calls a file and then sorts its contents.
> would it be something like this:
> 
> use strict;
> use vars qw(@unsorted @sorted $a $b);
> 
> open ('/applications/apache/cgi-bin/pape/number') or die "Can't open
> file: $!\n";

Hmmm...  you forgot the filehandle.  

open SORTER, '</applications/apache/cgi-bin/pape/number' or die $!;

and while I'm at it, why are you storing stuff under the cgi-bin
directory?  

> my @unsorted; 
> 
> @sorted = sort { $a <=> $b } @unsorted;

Sorting two empty arrays?  And is this a numerical or string 
comparison? <=> is for number like strings, while cmp is for
word like strings.

chomp(my @unsorted = <SORTER>); will read your file into an 
array for you to sort.
 
> u can tell i'm new at this can't you???

neh, doing fine.


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

Date: Thu, 17 Aug 2000 15:31:23 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: I have another question
Message-Id: <399C4B9B.F652A17@rac.ray.com>

Drew Simonis wrote:
> 
> pape_98@my-deja.com wrote:
> >
> > Now that I know how to sort correctly how do u implement a function
> > calls a file and then sorts its contents.
> > would it be something like this:
> >
> > use strict;
> > use vars qw(@unsorted @sorted $a $b);

You don't need to declare $a and $b either. I think I know why, but I
don't want to tell you something wrong. Testing, though, has proven
this.

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: 17 Aug 2000 19:20:58 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: iis4 path
Message-Id: <slrn8poeoq.fnk.dha@panix2.panix.com>

On Thu, 17 Aug 2000 15:16:36 GMT, kalpeshv@my-deja.com
<kalpeshv@my-deja.com> wrote:

>The script works fine on its own and Im sure its an IIS4 issue.

3 points:

Posted twice here for some reason.  Try not to do that.

Posted to both clpmisc *and* alt.perl, but separately, not
crossposted.  Don't do that.

Finally, to reiterate my response in alt.perl... why are you asking
here if you're sure it's an IIS problem?

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Please stop flirting with my canvas.	- Damian Conway


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

Date: Thu, 17 Aug 2000 20:50:25 GMT
From: mr_curmudgeon@my-deja.com
Subject: Re: Large Pieces of Code
Message-Id: <8nhj68$ohf$1@nnrp1.deja.com>

In article <8neti6$oc2$1@orpheus.gellyfish.com>,
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:

>
> This is a Perl newsgroup.
>

Oh! I thought it was the ladies' room. My bad.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 17 Aug 2000 19:42:07 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Mail processing
Message-Id: <39a23ef6.21677202@news.newsguy.com>

newsgroups@ckeith.clara.net (Colin Keith) wrote:
>In article <8ndn99$709$1@srvlis16.teleweb.pt>, "Nuno Santo" <nunosanto@netcabo.pt> wrote:
>>news delivery service via e-mail. Does someone know hoe can i check the mail
>>account and get the message so that i can insert it into the site?
>
>I don't quite understand this, 'news' usually refers to what you just 
>posted, 'mail' is e-mail. The two use different protocols.

I don't mean to sound like Godzilla, but maybe you ought to get
away from your newsreader for a few minutes.  In the rest of the
world, "news" means something quite different from what it might
mean to those of us on Usenet, and there's plenty of that sort
of news on the Internet in various forms.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Thu, 17 Aug 2000 21:51:54 +0200
From: Kjetil Skotheim <kjetilskotheim@iname.com>
To: Nuno Santo <nunosanto@netcabo.pt>
Subject: Re: Mail processing
Message-Id: <399C506A.7676A3C0@iname.com>



Nuno Santo wrote:
> 
> I´m building a site for my company, and they are thinking of subscribing a
> news delivery service via e-mail. Does someone know hoe can i check the mail
> account and get the message so that i can insert it into the site?

Make a perlscript run, say twice each hour, by using crontab (I'm
assuming
you are on linux/unix now, see 'man crontab'). The perlscript could
check for
incoming mail either by using the Net::POP3 module (get from
CPAN/www.perl.com)
or if it has access to the "mail spool file" say
/var/spool/mail/username it
could just read this file and parse it by methods probably found at
http://www.perl.com/reference/query.cgi?mail and for the news mails
just "insert it into the site".




-- 
Kjetil Skotheim
kjetilskotheim@iname.com


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

Date: Thu, 17 Aug 2000 21:08:54 GMT
From: hallian@hotmail.com
Subject: mkdir problem!!
Message-Id: <8nhk8l$pn6$1@nnrp1.deja.com>

hi all,

I'm trying to check and make directory for year, month and day don't
exist.  But I just can't create the directories.  I have tried it with
(1)system() command and mkir(filename,mode)

here it is:
==========
$archive="/tmp/archive";
$todayis=`date +%m:%d:%Y`;
($month,$day,$year)=split(/:/,$todayis);

if (! -d "$archive/$year")
{
  system("mkdir $archive/$year");
}

if (! -d "$archive/$year/$month")
{
  system("mkdir $archive/$year/$month");
}

and the same for day too....I just can't get this working.......anyone
able to help me !!!

hallian


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 17 Aug 2000 21:59:25 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: mkdir problem!!
Message-Id: <spoo1tk9r5j61@corp.supernews.com>

In article <8nhk8l$pn6$1@nnrp1.deja.com>,
     <hallian@hotmail.com> wrote:

: I'm trying to check and make directory for year, month and day don't
: exist.  But I just can't create the directories.  I have tried it with
: (1)system() command and mkir(filename,mode)

Take a look at the standard File::Path module.  It includes a mkpath
function that creates intermediate directories as necessary.  For
example, the following are equivalent (modulo error checking):

    use File::Path;
    mkpath "/tmp/archive/2000/01/30", 0, 0777;

    mkdir "/tmp",                    0777;
    mkdir "/tmp/archive",            0777;
    mkdir "/tmp/archive/2000",       0777;
    mkdir "/tmp/archive/2000/01",    0777;
    mkdir "/tmp/archive/2000/01/03", 0777;

Greg
-- 
Never underestimate the power of stupid people in large groups.
    -- George Carlin


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

Date: Thu, 17 Aug 2000 21:34:55 +0000
From: Omri Schwarz <ocschwar@mit.edu>
Subject: More Parse::RecDescent questions.
Message-Id: <399C5A7F.B2DC7B72@mit.edu>

I'm back to work on my C-to-English,
(clearly a case of bad drug interactions,
but the recent court decisions are also a factor)
and am having the usual set of problems.

Right now RecDescent is doing something odd that causes
all rules below a certain line to be ignored.

The script is at
http://www.mit.edu/~ocschwar/decss2.pl 

and rules from line 741 and below get ignored.

RD_TRACE stopes at this:

    Parse::RecDescent: Treating "identifier :" as a rule declaration
    Parse::RecDescent: Treating "...!" as a negative lookahead
    Parse::RecDescent: Treating "reserved" as a subrule match
    Parse::RecDescent: Treating "identifier_word" as a subrule match
    Parse::RecDescent: Treating "pointer :" as a rule declaration
    Parse::RecDescent: Treating "*" as a literal terminal

and then dumps the warnings and exits.

The warnings say that declaration_specifiers
and integer_constant are undefined, though they are,
so I must be doing something in the pointer: rule to 
break the parsing.

All assistance gratefully accepted.

Yours,

omri


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

Date: Thu, 17 Aug 2000 19:14:33 GMT
From: Declan Kelly <declan@chello.nl>
Subject: Moving CPAN Modules from Windows NT to Linux
Message-Id: <399C3B12.FC2A65EF@chello.nl>


I have created a number of Perl scripts for a web site running on
Windows NT
and now I want to move to Linux. I'm using a lot of the CPAN modules
including
the LWP and LWP::Parallel modules.

I don't expect any problems moving from Windows NT to Linux but I
would be interested to hear from anybody who has done this before.
Were there any unexpected problems or complications?

Thanks,

Declan.



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

Date: Thu, 17 Aug 2000 21:37:19 GMT
From: nancy <antsyp@my-deja.com>
Subject: Net::SMTP SIZE from EHLO command
Message-Id: <8nhluc$rr3$1@nnrp1.deja.com>

I am using Net::SMTP to send a message.
After sending the EHLO command, I would like to be able to get the SIZE
value returned by the server, but I'm not sure I can do this.

There are methods to get the domain and banner returned by the server,
but not one to return the SIZE sent back by the server, as far as I can
tell.
Does anyone know of a way to do this?

Thanks.

sample smtp session:
[root@dev2 maco2]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 dev.mydomain.com ESMTP Postfix Dev System
ehlo junk.com
250-dev2.bigfishmail.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250 8BITMIME




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 17 Aug 2000 18:13:19 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Open a new process for read AND write
Message-Id: <spoapvmqr5j184@corp.supernews.com>

In article <8nh818$am8$1@bignews.shef.ac.uk>,
    Mark Wrangham <aca97mpw@sheffield.ac.uk> wrote:

: I'm trying to use perl to automate my telnet sessions.  I want to be
: able to tie both STDIN and STDOUT of the telnet process to file
: handles.

Look at the documentation for the IPC::Open2 and IPC::Open3 modules
to see whether one is appropriate for your application.  Have you
looked at the Net::Telnet module?

Greg
-- 
That which we call sin in others is experiment for us.
    -- Ralph Waldo Emerson


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

Date: 17 Aug 2000 14:34:01 -0500
From: tzz@iglou.com (Teodor Zlatanov)
Subject: Re: Open a new process for read AND write
Message-Id: <399c3019$1_2@news.iglou.com>

<8nh818$am8$1@bignews.shef.ac.uk>:Mark Wrangham (aca97mpw@sheffield.ac.uk):comp.lang.perl.misc:Thu, 17 Aug 2000 18:35:58 +0000:quote:
: I'm trying to use perl to automate my telnet sessions.  I want to be able
: to tie both <STDIN> and
:  <STDOUT> of the telnet process to file handles.
: 
: I know that  open(TELNET_SEND "| telnet server.co.uk 110")  will connect
: the STDIN and open(TELNET_RECV "telnet server.co.uk 110") will connect the
: STDOUT but how do I connect both. Hint: I cant use these two commands
: becuase perl then starts two independant telnet sessions
: 
: I have tried using open(TELNET_SEND "| telent server.co.uk 110 >
: ~/telnet.temp") to connect the output of the telnet to a file then
: open(TELNET_RECV "~/telnet.temp") to read from the file but this
: introduces more issues involving timing

Look on CPAN (www.cpan.org) for Net::Telnet.  It almost certainly will solve
your problem better than bidirectional pipes.

-- 
Teodor Zlatanov <tzz@iglou.com>
"Brevis oratio penetrat colos, longa potatio evacuat ciphos." -Rabelais


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

Date: Thu, 17 Aug 2000 11:05:42 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <399C2976.83C8A4E9@vpservices.com>

"Alex T." wrote:
> 
> Hi,
> 
> I'm writing a program for generating custom mailing lists from a flat
> file database. Mailing lists are generated with the help of codes
> describing the type of the address. My flat file database is about 500
> kb and holds about 3,000 records 256 characters each. After I read
> records from this database into an array of records, I have to sort
> them. But when I try to run my program I get "Out of memory!" message.
> ...
> #read the source file
> open(SOURCE, "c:\\$ARGV[0]") || die "$!";
> my @all_lines = <SOURCE>;
> close(SOURCE);
> ...
> #create an array to hold records
> my @database;
> ...
> foreach my $line (@all_lines){

Don't create the array @all_lines.  Just loop through the file with
something like while(<SOURCE>){}.  Or use DBD::CSV or DBD::RAM with an
"ORDER BY" statement and loop through fetches.

-- 
Jeff


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

Date: Thu, 17 Aug 2000 18:36:52 GMT
From: "Ben Kennedy" <bkennedy@hmsonline.com>
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <8hWm5.108284$A%3.1424264@news1.rdc2.pa.home.com>


"Alex T." <samara_biz@hotmail.com> wrote in message
news:399C1BBE.1E5DB6EA@hotmail.com...

>     my $record = { "Firstname" => $firstname,
>                              "Lastname" => $lastname,
>                              "Address" => $address };
>
>       push(@database, $record);

 ...

>             @database = sort{ %{$database[$a]}->{Address} cmp
> %{$database[$b]}->{Address} } @database;

Your sort function looks way too funky - try

    @database = sort {
                    $a->{Address} cmp $b->{Address}
                            } @database;

With sort, $a and $b are aliased directly to the things that are getting
compared, in this case directlly to the hash references in @database.  Since
they are direct aliases, you can dereference them as normal - there is no
need to refer back to the array itself - (perldoc -f sort) - Hope this
helps -

--Ben Kennedy







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

Date: Thu, 17 Aug 2000 15:03:31 -0400
From: "Alex T." <samara_biz@hotmail.com>
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <399C3703.C4617043@hotmail.com>

So you think that my loading all lines into @all_lines array my program
consumes all the memory available to it?
What if I deallocate @all_lines by

@all_lines = ();

after I create @database array of all records? Actually.. I tried that too
already, but it's still "Out of Memory!"

Is there a limitation on the amount of data that Perl variables can hold?

Thanks,

Alex

Jeff Zucker wrote:

> "Alex T." wrote:
> >
> > Hi,
> >
> > I'm writing a program for generating custom mailing lists from a flat
> > file database. Mailing lists are generated with the help of codes
> > describing the type of the address. My flat file database is about 500
> > kb and holds about 3,000 records 256 characters each. After I read
> > records from this database into an array of records, I have to sort
> > them. But when I try to run my program I get "Out of memory!" message.
> > ...
> > #read the source file
> > open(SOURCE, "c:\\$ARGV[0]") || die "$!";
> > my @all_lines = <SOURCE>;
> > close(SOURCE);
> > ...
> > #create an array to hold records
> > my @database;
> > ...
> > foreach my $line (@all_lines){
>
> Don't create the array @all_lines.  Just loop through the file with
> something like while(<SOURCE>){}.  Or use DBD::CSV or DBD::RAM with an
> "ORDER BY" statement and loop through fetches.
>
> --
> Jeff



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

Date: Thu, 17 Aug 2000 15:05:48 -0400
From: "Alex T." <samara_biz@hotmail.com>
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <399C378C.4554AA88@hotmail.com>

Thanks for your reply.

Sure I will try what you suggested, but only after I get rid of "Out of memory!"
error. That's is why I asked the question in the first place.

Or... do you think that "Out of memory!" error is caused by the way I call the
sort() function?

Alex

Ben Kennedy wrote:

> "Alex T." <samara_biz@hotmail.com> wrote in message
> news:399C1BBE.1E5DB6EA@hotmail.com...
>
> >     my $record = { "Firstname" => $firstname,
> >                              "Lastname" => $lastname,
> >                              "Address" => $address };
> >
> >       push(@database, $record);
>
> ...
>
> >             @database = sort{ %{$database[$a]}->{Address} cmp
> > %{$database[$b]}->{Address} } @database;
>
> Your sort function looks way too funky - try
>
>     @database = sort {
>                     $a->{Address} cmp $b->{Address}
>                             } @database;
>
> With sort, $a and $b are aliased directly to the things that are getting
> compared, in this case directlly to the hash references in @database.  Since
> they are direct aliases, you can dereference them as normal - there is no
> need to refer back to the array itself - (perldoc -f sort) - Hope this
> helps -
>
> --Ben Kennedy



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

Date: Thu, 17 Aug 2000 19:28:35 GMT
From: "Ben Kennedy" <bkennedy@hmsonline.com>
Subject: Re: Out of memory! error. Working with arrays...
Message-Id: <D1Xm5.108293$A%3.1424494@news1.rdc2.pa.home.com>


"Alex T." <samara_biz@hotmail.com> wrote in message
news:399C378C.4554AA88@hotmail.com...
> Thanks for your reply.
>
> Sure I will try what you suggested, but only after I get rid of "Out of
memory!"
> error. That's is why I asked the question in the first place.
>
> Or... do you think that "Out of memory!" error is caused by the way I call
the
> sort() function?

Yep, most likely - remember $a and $b are aliases to the elements being
sorted, not array indexes

--Ben




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

Date: 17 Aug 2000 12:42:53 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Output to printer in Win NT
Message-Id: <399c403d@news.victoria.tc.ca>

hiroshiishii@my-deja.com wrote:
: Hi All:

: Would someone give an advice on how to print an ASCII string, "Hello
: world," to LaserJet4, which is on local parallel port (LPT1:), from
: WinNT or 98?

: I am using ActivePerl5.0.

There's no clever trick to printing text (or anything) from Windows (sad
to say).  Figure out what works in DOS and then use the same technique but
from perl. 

If the printer accepts plain text and is available as LPT1 then do the
following

	DOS	C:\> copy file LPT1

	perl	open P , ">LPT1" oe die $!
		print P "this line goes to the printer";
		# you may wish to send a FF at the end of the data

You can also print using windows applications, which allows you to send
data to a printer that does not accept text without doing conversions
yourself

	DOS	C:\> notepad /p data_save_in_file.txt

	perl	# first write the data into a temporary file TEMP.TXT
		system("notepad /p TEMP.TXT");
		# assumes notepad is setup to use the correct printer



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

Date: Thu, 17 Aug 2000 13:12:25 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: perl 5.6
Message-Id: <399C2B09.44190543@rac.ray.com>

Abigail wrote:
> 
> dwb1@home.com (dwb1@home.com) wrote on MMDXLII September MCMXCIII in
> <URL:news:Pine.LNX.4.20.0008160554320.9939-100000@ethyl.addictmud.org>:
> }}
> }} Hello,
> }}
> }} I'm about to upgrade some servers from perl 5.005_03 to 5.6.  I'm
> }} wondering if there are any traps I should watch out for.  We have
> }} an aweful lot of source code written in perl, (near 200000 lines
> }} of code), so I'm naturally concerned.
> 
> *Blink*
> 
> You're about to do an upgrade of an production environment, and your
> idea of regression testing is to ask on Usenet?
> 
> That's why you hava a test environment, and regression test, right?
> 


Maybe dwb1@home.com feels more comfortable wearing suspenders AND a
belt. I'd be interested in known problems in a migration path, whether
I had a test bed or not, and I think that this would be an appropriate
place to ask.

With that said, I (I'm just some guy, I'm not Raytheon) didn't have
any problems with my upgrade from 5.005_03 to 5.6 oh HP-UX 11.0 (or on
Windows 95 but that's just my desktop). My regression testing showed
absolutely zero differences in any program output/operation/results
between programs run on both versions. However, we don't have nearly
200,000 lines of code, so it's always a good idea to keep Murphy in
mind and have a tested backout plan. 

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: Thu, 17 Aug 2000 14:21:34 -0400
From: Andy Dougherty <doughera@lafayette.edu>
Subject: Re: perl 5.6
Message-Id: <Pine.SOL.4.10.10008171418030.29128-100000@maxwell.phys.lafayette.edu>

On Thu, 17 Aug 2000, Alex Buell wrote:

> In GCC, I can run the specific compiler package by specifying the
> version, i.e
> 
> gcc -V 2.7.2.3 file.c -o file
> gcc -V 2.95.2 file.c -o file
> 
> So it would be a nice thing to have:
> 
> perl -V 5.6.0 foobar.pl
> perl -V 5.7.2 foobar.pl

That's what the versioned binaries are for.  Try

	/usr/local/bin/perl5.00503
	/usr/local/bin/perl5.6.0

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042



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

Date: 17 Aug 2000 21:16:20 GMT
From: abigail@foad.org (Abigail)
Subject: Re: perl 5.6
Message-Id: <slrn8polfv.tj3.abigail@alexandra.foad.org>

Russ Jones (russ_jones@rac.ray.com) wrote on MMDXLIII September MCMXCIII
in <URL:news:399C2B09.44190543@rac.ray.com>:
&& Abigail wrote:
&& > 
&& > dwb1@home.com (dwb1@home.com) wrote on MMDXLII September MCMXCIII in
&& > <URL:news:Pine.LNX.4.20.0008160554320.9939-100000@ethyl.addictmud.org>:
&& > }}
&& > }} Hello,
&& > }}
&& > }} I'm about to upgrade some servers from perl 5.005_03 to 5.6.  I'm
&& > }} wondering if there are any traps I should watch out for.  We have
&& > }} an aweful lot of source code written in perl, (near 200000 lines
&& > }} of code), so I'm naturally concerned.
&& > 
&& > *Blink*
&& > 
&& > You're about to do an upgrade of an production environment, and your
&& > idea of regression testing is to ask on Usenet?
&& > 
&& > That's why you hava a test environment, and regression test, right?
&& > 
&& 
&& 
&& Maybe dwb1@home.com feels more comfortable wearing suspenders AND a
&& belt. I'd be interested in known problems in a migration path, whether
&& I had a test bed or not, and I think that this would be an appropriate
&& place to ask.

But that's not what he said. He might have a test bed, but he said
he was going to update some servers. Wouldn't it be more logical that
if he was going to test things out, he'd said he was going to test
things out?

&& With that said, I (I'm just some guy, I'm not Raytheon) didn't have
&& any problems with my upgrade from 5.005_03 to 5.6 oh HP-UX 11.0 (or on
&& Windows 95 but that's just my desktop). My regression testing showed
&& absolutely zero differences in any program output/operation/results
&& between programs run on both versions. However, we don't have nearly
&& 200,000 lines of code, so it's always a good idea to keep Murphy in
&& mind and have a tested backout plan. 


I had a handful of programs that broke. None of them over 100 lines, and
several of them 4 lines or less.

And no, I don't think any of them will be fixed in 5.6.1. :-(


Abigail
-- 
sub A::TIESCALAR{bless\my$x=>'A'};package B;@q=qw/Hacker Perl
Another Just/;use overload'""',sub{pop @q};sub A::FETCH{bless
\my $y=>B};tie my$shoe=>'A';print"$shoe $shoe $shoe $shoe\n";


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

Date: 17 Aug 2000 19:49:57 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Perl code for a newbie!!
Message-Id: <slrn8pogf5.fnk.dha@panix2.panix.com>

On Fri, 11 Aug 2000 16:21:57 +0100, Craig Pugsley
<craig.pugsley@mimesweeper.com> wrote:

>As a point of interest, what does the extra "-w" mean?

It turns on warnings, which can be helpful... :-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
No, I don't have a ministry of car healing.
    - What's Your Name


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

Date: 17 Aug 2000 19:57:02 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Perl code for a newbie!!
Message-Id: <slrn8pogse.fnk.dha@panix2.panix.com>

On Fri, 11 Aug 2000 10:36:41 -0700, Larry Rosler <lr@hpl.hp.com> wrote:

>As warned in the FAQ (but not in the Perl documentation!),

<nitpick>Isn't the FAQ part of the Perl documentation?</nitpick>

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"i don't play lead.  it interferes with my drinking." - Malcolm Young


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

Date: Thu, 17 Aug 2000 19:25:43 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Perl code for a newbie!!
Message-Id: <39a00746.7419028@news.newsguy.com>

"Craig Pugsley" <craig.pugsley@mimesweeper.com> wrote:

>I reaffirm my original comments:
>
>> I was making a (slightly
>> blanketed, admittedly) comment on the general state of affairs in the
>> tech-community on the web. Why should I have to quote examples just to
>> justify my (personal) comments? I think [generally, people's] comments
>seem to encapsulate exactly the extent to
>> which the tech community has disappeared up its own (proverbial) backside.

No one asked you to quote examples.  You wrote "I share your
sentiments exactly", but didn't indicate which sentiments you
meant in the message you were replying to, so your message was
difficult to interpret (especially since none of the three
people you quoted said anything to suggest that they share your
hostility toward this newsgroup).  That's what happens when you
don't quote the *relevant* bits of a message when you reply.

>Please note the format and structure of my quoted comments? Do you feel that
>carry more weight now?
>
>Oh dear me.

With any mode of communication, how you say something is often
as important as what you say.  If you mumble in face-to-face
communication, for example, people may miss the points you're
trying to make, or even ignore you completely.

And of course you've *still* pointlessly quoted my whole message
at the end of yours.  It seems you're now either purposely
trying to annoy people or incapable of learning.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Thu, 17 Aug 2000 14:19:55 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Perl code for a newbie!!
Message-Id: <MPG.1405f6d5799b1bd398ac89@nntp.hpl.hp.com>

In article <slrn8pogse.fnk.dha@panix2.panix.com> on 17 Aug 2000 19:57:02 
GMT, David H. Adler <dha@panix.com> says...
> On Fri, 11 Aug 2000 10:36:41 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
> 
> >As warned in the FAQ (but not in the Perl documentation!),
> 
> <nitpick>Isn't the FAQ part of the Perl documentation?</nitpick>

Not by my interpretation.  Blame it on my experience with formal 
language standards.

There is an ANSI/ISO C Standard.  That is the documentation.  It is 
accompanied by a Rationale.  That is commentary, like the FAQ.

But equating 'Perl documentation' to 'formal language standards' is 
incongruous, isn't it?  :-(

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 17 Aug 2000 17:30:28 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Perl code for a newbie!!
Message-Id: <399C5974.155ED667@attglobal.net>

Larry Rosler wrote:

> But equating 'Perl documentation' to 'formal language standards' is
> incongruous, isn't it?  :-(
> 

Subtle, very subtle.


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

Date: Thu, 17 Aug 2000 21:46:43 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Perl code for a newbie!!
Message-Id: <spona3ivr5j79@corp.supernews.com>

In article <MPG.1405f6d5799b1bd398ac89@nntp.hpl.hp.com>,
    Larry Rosler  <lr@hpl.hp.com> wrote:

: But equating 'Perl documentation' to 'formal language standards' is 
: incongruous, isn't it?  :-(

Formal?  Standards?  Perl?  It's weird seeing those in the same
sentence. :-)

Greg
-- 
Cop:     McManus told us another story altogether.
Fenster: Is that the one about the hooker with dysentery?


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

Date: Thu, 17 Aug 2000 19:33:00 GMT
From: computertech@my-deja.com
Subject: porting send.pl to linux from a solaris system
Message-Id: <8nhelb$ivo$1@nnrp1.deja.com>

Hi,

I have run into a problem trying to get my webmail to work for my linux
system. The original scripts were written for a solaris system. My
problem is with the send.pl script. For some reason I get an error that
says "Failed to open a socket for the connection to the SMTP
server $host". Does anyone know how to fix this?

Below is a snippet of the code where the problem may be.

Thanks you for any help you can give me,

computertech.

sub sendmail
{
        local($server,$from,$rcpt,$body) = @_;
        local($packing_template) = "S n a4 x8";
        local($protocol) = "tcp";
        local($port) = 25; #SMTP
        local($thishost, $problem, $junk);
        local($sockname);

        ($name, $junk, $junk, $junk, $theiraddr) = gethostbyname
($server);

        if (! $theiraddr) {
                  $smtp_error = "Failed to resolve address for the SMTP
server $server
\\n[$!]";
          return 0;
        }

        ($name, $junk, $proto) = getprotobyname($protocol);

        # if things dont work check what AF_INET and SOCK_STREAM are
for you
        $them = pack($packing_template, $af_inet, $port, $theiraddr);
        if (!(socket(SOCKET, $af_inet, $sock_stream, $proto))) {
                $smtp_error = "Failed to open a socket for the
connection to the SMTP
server $host\\n[$!]";
                return 0;
        }



Sent via Deja.com http://www.deja.com/
Before you buy.


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

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 4049
**************************************


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