[7784] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1409 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 4 20:07:18 1997

Date: Thu, 4 Dec 97 17:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 4 Dec 1997     Volume: 8 Number: 1409

Today's topics:
     Re: "man perlsec" tainting question (brian d foy)
     Re: 001 + 1 = 002; 002 - 1 = 1 ARGH <rootbeer@teleport.com>
     Re: [Fwd: "use lib $lib_path" doesn't work] <rootbeer@teleport.com>
     ^M removal <buxx@buxx.com>
     Re: Accessing modem in winNT <pvhp@forte.com>
     Re: Email Manipulation Quandry <rootbeer@teleport.com>
     Re: How do I print all but the first variable in an arr <rhodri@wildebst.demon.co.uk>
     Re: How To Test if number is ODD or EVEN? (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Re: IIS 3.0 seems to ignore #EXEC directive (Philippe Gaudron)
     Re: methods for array del(), put() in DB_File not worki (Paul Marquess)
     Re: Modifying an array which has been passed in by name <rootbeer@teleport.com>
     Modifying file attributes (Andrew Haveland-Robinson)
     Re: My error: FORBIDDEN You don't have permission to ac <rootbeer@teleport.com>
     Re: Parameter Checking (brian d foy)
     Re: Perl Contractors Wanted (Native Tongues)
     Re: Perl Plug-In for Netscape? <pvhp@forte.com>
     Re: Perl scripts to lookout for?? (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Re: Perl syntax error (brian d foy)
     Re: Perl4 is not Y2K (was Re: Forced to use brain-dead  <rootbeer@teleport.com>
     Re: Perl4 is not Y2K (was Re: Forced to use brain-dead  (I R A Aggie)
     Re: Resource Kit Anomaly (brian d foy)
     Re: return value of system <rootbeer@teleport.com>
     Re: Rounding functions for perl? <rootbeer@teleport.com>
     Re: Seems to be just another  5.004_* bug:-( <rootbeer@teleport.com>
     Re: Setting default printer under Windows NT charlot@SPAM-FREE.org
     Re: switch stdout and stderr (Hans-Georg Fischer)
     Re: trying to understand arrays of hashes <rootbeer@teleport.com>
     Wrapping Text in Forms? <dchavez@horizonint.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 04 Dec 1997 15:21:38 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: "man perlsec" tainting question
Message-Id: <comdog-ya02408000R0412971521380001@news.panix.com>

In article <666j7e$q69@newsstand.cit.cornell.edu>, Rohan Oberoi <rohan.oberoiTAKETHISOUT@cornell.edu> wrote:


>I expected that "$ARGV[0] =~ m|(Hello)| and $foo = $1;" would
>taint $foo because of the presence of $ARGV[0].  Can anyone 
>explain why it doesn't ?

because matching and subsequent use of the $1 (or $2, $3, ...)
variable untaints the data.  $ARGV[0] is tainted, but $1 is not,
so $foo is not.

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Thu, 4 Dec 1997 13:16:19 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Roy S. Rapoport" <rsr@best.com>
Subject: Re: 001 + 1 = 002; 002 - 1 = 1 ARGH
Message-Id: <Pine.GSO.3.96.971204131545.4421D-100000@usertest.teleport.com>

On 3 Dec 1997, Roy S. Rapoport wrote:

> I checked the book and indeed only the ++ op is magical (I wonder
> why?).

Probably because there's no obvious predecessor to 'a000', for example.
Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 4 Dec 1997 14:09:55 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Emilio Maneiro Marquez <emaneiro@bigfoot.com>
Subject: Re: [Fwd: "use lib $lib_path" doesn't work]
Message-Id: <Pine.GSO.3.96.971204140746.4421L-100000@usertest.teleport.com>

On Wed, 3 Dec 1997, Emilio Maneiro Marquez wrote:

> I wanted to read from a file the path where my packages are and pass a
> variable to the "use lib" statement but it doesn't work.

Sure, it works. But you have to use it right. :-)

> my $lib_path = "/usr/acct/x/lib";
> use lib $lib_path;

The trick is that the 'use' happens at compile time, but the assignment to
$lib_path was happening at run time - that is, not in the "obvious" order. 
You can fix this by using a BEGIN block to set the $lib_path at compile
time. 

    my $lib_path;
    BEGIN { $lib_path = "/usr/acct/x/lib"; }
    use lib $lib_path;

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 15:40:49 -0600
From: Buxx <buxx@buxx.com>
Subject: ^M removal
Message-Id: <34872361.5A78@buxx.com>

I need to strip out ^M characters from files I've copied from 
MSDOS files

s/<?>//g;


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

Date: Tue, 02 Dec 1997 21:50:04 -0800
From: Peter Prymmer <pvhp@forte.com>
To: Ryan McGuigan <ryan@ramresearch.com>
Subject: Re: Accessing modem in winNT
Message-Id: <3484F30C.66B4@forte.com>

Ryan McGuigan wrote:
> Hi, does anyone know how to access a modem in windows NT?  I need to write a
> script that will use a modem to automatically page someone if our web server
> goes down.


Unfortunately I only have a partial answer that was originally due to 
Terry Michael Fletcher <tfletche@pcocd2.intel.com> that in my *modified
but still not working form* appears as:

#!/usr/intel/bin/perl -w

print "Starting to open modem...\n";

system('mode COM2 baud=19 parity=n data=8 rts=on to=off octs=off');
open (MODEM, "+>COM2") || die $!;

$/ = undef(); # "\b";      # seems to be the terminating char
select MODEM; 
$| = 1; 
select main::STDOUT;
print "ATDT\n";
print MODEM "ATDT\r";

sleep 8;        # 4 seems to be enough to let modem respond

$response = <MODEM>; # slurp up to the \b char (or \008)

close(MODEM);

map {print ord$_,","} (split //,$response); # print char values
print "\n>$response<\n";                      # print the string

print "Done\n";

__END__

that (suitably modified: ie, is your modem on COM1, COM2 or COM3?) 
should get you started - docs from your modem manufacturer should help
you further along with the modem protocol negotiation.

Good luck - let the group know of your success!

Peter Prymmer


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

Date: Thu, 4 Dec 1997 13:45:43 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: jklyne@med.osd.mil
Subject: Re: Email Manipulation Quandry
Message-Id: <Pine.GSO.3.96.971204134400.4421J-100000@usertest.teleport.com>

On Wed, 3 Dec 1997 jklyne@med.osd.mil wrote:

> Retrieving the mail seems to be well supported. I was wondering if there
> is anything to remove email attachments and if so whether it is in the
> mailtools or mime modules.

Are the docs of those modules somehow insufficient?

> If anyone has any ideas on verifying the source of the mail I'd love to
> hear it. 

PGP.

> I will not be able to do anything on the sending side in terms of
> encryption or authentication.

Then you seem to be asking for the impossible. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 00:53:28 +0000 (GMT)
From: Rhodri James <rhodri@wildebst.demon.co.uk>
Subject: Re: How do I print all but the first variable in an array?
Message-Id: <47f2f10968rhodri@wildebst.demon.co.uk>

In article <3487a7be.28527677@news.demon.co.uk>,
 James Zubin Pope <jzp@usa.net> wrote:
> Basically I have an array of:

> @stuff

> and I want to print $stuff[1] and $stuff[2] and $stuff[3] etc BUT NOT
> $stuff[0].

foreach (1..$#stuff) { print "$stuff[$_]\n"; }

> P.S. Could you forward any replies to my email aswell? Ta.

No :-)

-- 
Rhodri James  *-*  Wildebeeste herder to the masses
If you don't know who I work for, you can't misattribute my words to them

 ... The Internet is full.  Go away.


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

Date: Tue, 02 Dec 97 23:47:39 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: How To Test if number is ODD or EVEN?
Message-Id: <3484e6b3$1$ofn$mr2ice@speaker>

In <65vrr1$g4i2@eccws1.dearborn.ford.com>, on 12/02/97 at 02:29 AM,
   fox@pt0204.pto.ford.com (Ken Fox) said:
+-----
| About the only programmer I'd expect to use the regex is
| a Prolog programmer who thinks arithmetic is implemented using the sucessor
| function. ;) [3]
+--->8

Possibly a SNOBOL or Icon programmer, although not expressed as a regex. 
'Course, I do Icon as well --- but probably wouldn't touch that one IRL. 
Lessee... ``if repl('1', get(args)) ? ((t <= many('1') ) & =t & pos(0)) then
print "Prime"'' --- just doesn't have the same ring to it, even ignoring that
you can't do it on the command line and you need to wrap it in a procedure :-)

-- 
package b;sub AUTOLOAD{print$_{$_.++$x{$_}};}sub new{my%x;%_=map{++$a%2?$_.++$x
{$_}:$_}split(//,pack('N*',unpack('w*',unpack('u*','MA(O)@F.$D]609833A:!KA9NA'.
"ODJ%^]&^987[H;YRA?FQPG2&DY7(88:KR=@@\n4AN+!W\"\"&\\[W>;H>3S>1LA\\F`PB\$"))))
;bless{};}package a;map{eval"(new b)->_"}split(//,'_Brandon_S_Allbery_JAPH__');


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

Date: Thu, 04 Dec 1997 21:34:34 GMT
From: pgaudron@babel.net (Philippe Gaudron)
Subject: Re: IIS 3.0 seems to ignore #EXEC directive
Message-Id: <3487200d.4767544@news.asi.fr>

Kerry Peterson <peterson@cns.uni.edu> wrote:

>In trying to execute a perl script from within a .htm document, it seems

>to ignore the line <!--#exec cgi="testit.pl"-->, as if I'm running IIS
>2.0. We're running NT 4.0 with IIS 3.0. I've renamed the doc with a .stm

>extension, verified that I have ServerSideIncludesEnabled set to 1 in
>the registry and verified that I can run #include statements. What might
>we
>be missing or doing wrong to make it ignore the directive? I'm able to
>run
>.pl files in other aspects,

>-- K. Peterson

I think IIS 3.0 only accepts #include directive.
See HTML doc, Chap 10 (Register): EnableServerSideIncludes, or
something like that

[Follow-up to comp.infosystems.www.servers.ms-windows]

Regards

P. Gaudron


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

Date: 4 Dec 1997 21:42:29 GMT
From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
Subject: Re: methods for array del(), put() in DB_File not working
Message-Id: <667845$ect$1@pheidippides.axion.bt.co.uk>

[ Posted & Mailed ]

nick@ideation.net wrote:
: In my code which uses a tied array in the DB_File modual, I have this
: quoting:

: <CODE>
: $T = tie(@temp, "DB_File","$dirOpen/$file", O_RDRW, 644, $DB_RECNO)
: 	or die "Cannot tie file: $!, $0\n";
: </CODE>

: as the declaration for my file that I wasnt to inplace edit.

: This method of getting the length of the array works:

: <CODE>
: $lengthOfFile = $T->length;
: </CODE>

: but these don't:

: <CODE>
: $T->del($cut) or die "Could not cut: $!,$?\n";
: ....
: $T->put($begin, "<NOFRAMES>\n @rightFrame \n </NOFRAMES>", R_IAFTER)
: 	or die "Could not put: $!,$?\n";
: </CODE>

: Both yield the die statements. Am I to guess that these methods simply
: aren't implemented? This is perl 5.004

Nope. Your answer is in the DB_File documentation:

    THE API INTERFACE

    ...
    The methods return a status value. All return 0 on success.  All
    return -1 to signify an error and set $! to the exact error code.
    The return code 1 generally (but not always) means that the key
    specified did not exist in the database.

Paul


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

Date: Thu, 4 Dec 1997 13:43:31 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Narayan Moni <moni@****platinum.com>
Subject: Re: Modifying an array which has been passed in by name ...
Message-Id: <Pine.GSO.3.96.971204134209.4421I-100000@usertest.teleport.com>

On Wed, 3 Dec 1997, Narayan Moni wrote:

> @Foo = (1,2);
> &Modify (*foo);

If you want to make a routine which modifies an array, you should probably
make it take an array reference, rather than a typeglob, for various good
reasons. (Of course, you also should spell it correctly. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 21:53:51 GMT
From: andy@osea.demon.co.uk (Andrew Haveland-Robinson)
Subject: Modifying file attributes
Message-Id: <348f15d9.98722485@news.demon.co.uk>

I've written a "touch" utility for html files which simply reads their file
attributes and updates their "Last-Modified" fields accordingly...

Trouble is, when the new files are saved the original file date/time is lost,
so is a single-shot tool...
The contents need to be inivisibly modified so future "touches" won't
overwrite the "Last-Modified" details.


How can I restore the original file attributes in Perl (NT version)?
I can't find anything anywhere about this.

Cheers,
Andy.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haveland-Robinson Associates, 17 Williams Way, Fleet, Hants GU13 9EU England
Tel. +44 (0)1252-811670      ICQ: 1331640       Web: http://www.haveland.com
Register a Domain: http://www.yourname.com/cgi-bin/life-cgi/dnr.cgi?10101010


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

Date: Thu, 4 Dec 1997 14:11:24 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Dan Bernard <dan@coombsmedia.com>
Subject: Re: My error: FORBIDDEN You don't have permission to access /cgi-bin/ on this server.
Message-Id: <Pine.GSO.3.96.971204141034.4421M-100000@usertest.teleport.com>

On 4 Dec 1997, Dan Bernard wrote:

> Newsgroups: mgate.htmlscript.users, comp.lang.perl.tk, comp.lang.perl

If your news administrator still carries comp.lang.perl, please let him
or her know that that newsgroup has not existed since 1995. If you
have such an outdated newsgroup listing, you are probably missing out
on many other valid newsgroups as well. You'll be doing yourself and
many others a favor to use only comp.lang.perl.misc (and other valid
Perl newsgroups) instead.

Of course, this has nothing to do with c.l.p.tk.

> Subject: My error: FORBIDDEN You don't have permission to access /cgi-bin/ on this server.

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN. Hope this helps!

   http://www.perl.com/CPAN/
   http://www.perl.org/CPAN/
   http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
   http://www.perl.org/CPAN/doc/manual/html/pod/

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 15:30:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Parameter Checking
Message-Id: <comdog-ya02408000R0412971530030001@news.panix.com>

In article <666cto$t1k$1@news2.xs4all.nl>, "Hans Van Lint" <hvanlint@lodestar.be> wrote:

>Is there a way to check if the data entered by a user in a form is an
>integer value??

>User fills in value -> A5
>Gets message --> Please enter an integer value

but that is an integer value.

perhaps you wanted a string of decimal digits though.  if so, you might
want to check the Perl FAQ for your answer (yep. it's in there).

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Thu, 4 Dec 1997 21:49:13 -0000
From: "Martin (Native Tongues)" <spam.be.gone-contact@nativetongues.com>
Subject: Re: Perl Contractors Wanted
Message-Id: <6679nv$jte$1@heliodor.xara.net>

*Chuckle* Thanks, as a perl newbie I was starting to get intimidated by all
the techie terms out there.. I needed that...

Martin


Martien Verbruggen wrote in message <6652kg$5hu$2@comdyn.comdyn.com.au>...
>In article <348470CE.13D5FA40@martech.pageactive.com>,
> Peter Marshall <peterm@martech.pageactive.com> writes:
>
>> We are looking for Perl Contractors.
>
>Perl?
>
>> - we are Perl savy, you will not have to deal Perl wannabes
>
>savy?
>wannabes?
>deal Perl?
>
>> - you are one two types (yes there are more types)
>
>more than 'one two types'? 'four eight type'?
>
>>    b) you like to be invovled from start contribute to the
>> creative solution
>
>invovled from start contribute?
>
>> DONOT POST REPLY Email to peterm@pageactive.com or call the
>> number below.
>
>Gosh, you guys sound professional. I am too intimidated to reply now..
>--
>Martien Verbruggen                  |
>Webmaster www.tradingpost.com.au    | Very funny Scotty, now beam down my
>Commercial Dynamics Pty. Ltd.       | clothes.
>NSW, Australia                      |




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

Date: Tue, 02 Dec 1997 21:39:35 -0800
From: Peter Prymmer <pvhp@forte.com>
To: Eric Hilding <eric@hilding.com>
Subject: Re: Perl Plug-In for Netscape?
Message-Id: <3484F097.7E3E@forte.com>

Eric Hilding wrote:


> Eric Hilding wrote:
> ***UPDATED***
> >
> > Tad McClellan (tadmc@metronet.com) wrote:
> > : Eric Hilding (eric@hilding.com) wrote:
> > : : I've looked around but just can't seem to find the
> > : : info on an alleged Perl 'Plug-In' for Netscape.  Any
> > : : references would be appreciated.  Tnx.
> >
> > : Where did you hear the allegations?
> >
> > It was on a Tcl related website somewhere...can't remember where,
> > but sent an inquiry to an e-mail link on the page in the wee hours
> > of the morning.  After several days, still no response so I posted.
> 12/2/97 ***FOUND IT AGAIN*** ...

> OK... "where are the 'perl plug-ins' hiding "on the web"???????????????





Stan Melax wrote one for perl but it was for a much older (> 1 year ago)
verision of Netscape.  Stan is in Canada.

Peter Prymmer


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

Date: Thu, 04 Dec 97 16:11:34 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: Perl scripts to lookout for??
Message-Id: <34871cdc$10$ofn$mr2ice@speaker>

In <881180506.840975@thrush.omix.com>, on 12/03/97 at 08:18 PM,
   Zenin <zenin@best.com> said:
+-----
| : Does the perl program have built protection against
| : malicious code?
| 	Outside of it's file permissions, no.
+--->8

Not entirely correct:  if you run a script with -T for taint checking, it will
catch many unsafe operations.

-- 
use 5.004;sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{
$_}:$_}split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!'.
"A'6\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0\@A\\N\@PB\$`")
)));bless{}}$b=(new main);map{$b->_}split(//,' Brandon S. Allbery KF8NH') # :-)


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

Date: Thu, 04 Dec 1997 15:34:47 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl syntax error
Message-Id: <comdog-ya02408000R0412971534470001@news.panix.com>

In article <3486B30A.2DCA@cam.org>, concord@cam.org wrote:

>I have a book Using Perl 5 for Web Programming (a QUE book)
>This code is taken right from the book.

perhaps you should take the book back and get a refund.  

>#!/usr/local/perl
>for $list(0..$#dirs) {
>    if (!($dirs[$list]=[td]/temp/ || $dirs[$list]=[td]/images/ )) {
>       $newdir=$dir."/".$dirs[$list];
>       &scan_files ($newdir);
>    }
>}
>
>When I compile this code under Perl 5.003 (Unix) I get
>
>syntax error at test.pl line 3, near "/ ||"
>syntax error at test.pl line 7, near "}"
>test.pl had compilation errors.


i have no idea what the intent of this code was, but it looks as if
the author might have meant:

 ( !($dirs[$list]="[td]/temp/" || $dirs[$list]="[td]/images/" )

although that still makes no sense.

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Thu, 4 Dec 1997 13:27:28 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Andrew M. Langmead" <aml@world.std.com>
Subject: Re: Perl4 is not Y2K (was Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?)
Message-Id: <Pine.GSO.3.96.971204131722.4421E-100000@usertest.teleport.com>

On Wed, 3 Dec 1997, Andrew M. Langmead wrote:

> Randal Schwartz <merlyn@stonehenge.com> writes:
> 
> >But it works!
> 
> I can understand your eagerness to get rid of perl 4, but I have to
> say that I prefered your original posts "perl 4 MIGHT NOT be Y2K
> compilent" over the form it has turned into "perl4 IS NOT Y2K
> compilent."
> 
> Although I can't come up with a good reason why I prefer a phrase that
> is intentionally misleading over one that is deliberately deceiptful.

Here are some true statements you may wish to say to any pointy-haired
managers you happen to meet:

    People who are worried about Y2K issues are replacing Perl 4
    with Perl 5. 

    Perl 5 was written by people who are aware of Y2K issues.

    There are a number of CERT advisories warning against using
    Perl 4, due to security problems.

    It's easy to convert old scripts to run under Perl 5 - In most
    cases, there's nothing to change. And you can have both versions
    available during the conversion, so there need bo no downtime.

    The people who work with Perl the most recommend that we use
    the most stable, secure, and reliable version of Perl. 

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 16:55:16 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl4 is not Y2K (was Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?)
Message-Id: <-0412971655170001@aggie.coaps.fsu.edu>

+ >I R A Aggie <fl_aggie@thepentagon.com> wrote:

+ >>Eventually, perl 4 will be blamed for violence, flood, famine, 
+ >>and El Nino.

+ mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
 
+ >Not to mention the plague of Camel fleas.

In article <34871c82.803003@news.tornado.be>, bart.mediamind@tornado.be
(Bart Lateur) wrote:

+ Eventually, people will say: "Perl 4!?!?! Who the hell did design such
+ crap!?!"

"Larry Wall and Randal Schwartz and their involvement in the development 
 of Perl 4 -- innocent dupes or criminal masterminds? Next on Geraldo!"

James -- sprinkle in :)'s a necessary...

-- 
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Thu, 04 Dec 1997 15:27:01 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Resource Kit Anomaly
Message-Id: <comdog-ya02408000R0412971527010001@news.panix.com>

In article <666lsd$al@tekka.wwa.com>, scribble@tekka.wwa.com (Tushar Samant) wrote:

>ghowland@hotlava.com writes:
>>The java stuff is, to be honest, piss poor.  I was hoping for a perl ->
>>java bytecode compiler -
>
>That's the impression I got. This is pretty disappointing.

i suppose that no one has considered this is the first release of a 
perl->java thingy, and that things will get better?  certainly the
author has a pretty good track record for that sort of thing :)

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Thu, 4 Dec 1997 13:35:34 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Umm <l41484@alfa.ist.utl.pt>
Subject: Re: return value of system
Message-Id: <Pine.GSO.3.96.971204132822.4421F-100000@usertest.teleport.com>

On 3 Dec 1997, Umm wrote:

> What does the system function call returns, when there are no processes
> available???? 

That depends upon what you ask of it, as I understand things.

If you give system a list of arguments, or a single argument without shell
metacharacters, Perl runs the command directly. The return value will be
0xFF00 if the command can't be run, I believe.

If you give system a single argument which contains shell metacharacters,
Perl starts a shell (/bin/sh) to run the command. Now the return value
will be the shell's return value, or 0xFF00 if the shell can't be run.
Note that if there's just one process available, that will be the shell -
which then may not be able to run the other processes!

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 4 Dec 1997 13:38:13 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: brian d foy <comdog@computerdog.com>
Subject: Re: Rounding functions for perl?
Message-Id: <Pine.GSO.3.96.971204133652.4421G-100000@usertest.teleport.com>

On Wed, 3 Dec 1997, brian d foy wrote:

> >sprintf does round.  At least it does for me. =)
> 
> my mistake - it's even documented that way in the printf man page.  i'm
> not sure it is like this on all systems though.  if you depend on
> rounded numbers you should make sure that everything operates as you
> expect.  i've never relied on printf to do this for me :) 

As of 5.004, printf and sprintf are implemented directly within perl, so
they should be the same on every system. If you find that you can't rely
upon them now, you'll need to file a bug report. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 4 Dec 1997 14:14:35 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Vladimir Sovetov <sova@kpbank.ru>
Subject: Re: Seems to be just another  5.004_* bug:-(
Message-Id: <Pine.GSO.3.96.971204141220.4421N-100000@usertest.teleport.com>

On 4 Dec 1997, Vladimir Sovetov wrote:

>      Well, anyway I don't like that this little thing
> 
> 	 s/<([^>]+)*>//;
> 
>    could hang-up your script now under 5.004_04.

It's written in a way that can waste a lot of time. That's no different in
principle than this.

    for ($n=1; $n < 1e12; $n++) { sleep 1 }

What do you propose that we do about it? :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 4 Dec 1997 16:37:09 -0500
From: charlot@SPAM-FREE.org
Subject: Re: Setting default printer under Windows NT
Message-Id: <6677q5$gom@ocean.CAM.ORG>

In article <3486E858.6DEF@gecm.com>, Jim Michael  <jim.michael@gecm.com> wrote:
>charlot@cam.org wrote:
>> I would like to know if it is possible to set the default printer of a Windows
>> NT (3.51) server from Perl.  "Now why would you want to do that ?", you aks...
>(deletia)
>> Now for the difficult part (well, it's difficult to me anyways): some reports
>> must be printed in "landscape" orientation.  The approach I am trying is to
>> define two NT printers pointing to the same physical printer, but one in
>> portrait mode and the other in landscape.  Now all I need is to switch the
>> default printer when needed.  I tried mucking around in the registry, but
>
>You can define a LPT1 port from the command line:
>
>net use lpt1 /delete
>net use lpt1 \\myprintserver\landscapeprintername
>

Thanks for the tip, but this doesn't seem to work.  Netscape prints to the
current Windows default printer, not LPT1.  Which brings me back to my
original query: is there a way to change the default printer from Perl under
Windows NT ?  Or to change the page layout of a printer ?

Richard.
-- 
Richard Bellavance -- charlot(at)cam(dot)org -- http://www.cam.org/~charlot/
    "All along this path I tread  /  My heart betrays my weary head
     With nothing but my love to save / From the cradle to the grave"
                                 (Eric Clapton, "From the cradle")


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

Date: Thu, 04 Dec 1997 21:22:59 GMT
From: hgf@berlin.snafu.de (Hans-Georg Fischer)
Subject: Re: switch stdout and stderr
Message-Id: <34871ee2.6388381@news.snafu.de>

Stuart Hughes <seh@pecc.co.uk> wrote:
>$resp                  .= `crontab -l > $tmpcron`; ### I need stderr
If your shell is bash:
$resp = `crontab -l 2>&1 > $tmpcron` 
### Yes first 2>&1 and than > $tmpcron
This copys the filehandel of stdout to stderr, so you get the output
of stderr in $resp and then redirects stdout to $tmpcron. 
--
Hans-Georg Fischer



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

Date: Thu, 4 Dec 1997 13:40:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: John Dubchak <jdubchak@mb.sympatico.ca>
Subject: Re: trying to understand arrays of hashes
Message-Id: <Pine.GSO.3.96.971204134025.4421H-100000@usertest.teleport.com>

On 3 Dec 1997, John Dubchak wrote:

> Subject: trying to understand arrays of hashes

> I cannot seem to visualize this in order to fully understand it.  Any 
> assistance would be helpful.

Have you read the manpages perlref, perldsc, and perllol? Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 04 Dec 1997 14:57:47 -0700
From: Dale Chavez <dchavez@horizonint.com>
Subject: Wrapping Text in Forms?
Message-Id: <3487275A.D30076FF@horizonint.com>

Here's the scenario:

1. I open a temp file for writing.
2. I have a form that has a text input box.
3. The user presses the submit button and the data gets written and the
file closes.

No problem.

However, when user manually enters a CR in the text form, I get a bogus
temp file with the name of the new line as the temp file!  What could be
causing this?  How do I fix?

Thanks,
Dale



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1409
**************************************

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