[11052] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4652 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 14 15:07:23 1999

Date: Thu, 14 Jan 99 12:00:20 -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, 14 Jan 1999     Volume: 8 Number: 4652

Today's topics:
    Re: Calculating to Decimal Places (Tad McClellan)
        Confusion with hashes and undef <bradw@kannews.newbridge.com>
    Re: Confusion with hashes and undef <Eric.L.Winter.1@gsfc.nasa.gov>
    Re: Help CGI times out (doc contains no data) (Larry Rosler)
    Re: leading zeros (Tad McClellan)
        Looking for Perl programmer in NYC area (Robert Watkins)
    Re: Looking for Perl programmer in NYC area (brian d foy)
    Re: max. length of perl regexp (Ilya Zakharevich)
        MDB files and Perl. <gdoucet@ait.acl.ca>
        need script or fix to mine <childers@acns.fsu.edu>
        parse exception with perl/NT (Emil Rivas)
    Re: Perl Criticism (David Formosa (aka ? the Platypus))
    Re: Perl Criticism (I R A Aggie)
    Re: Perl Criticism (I R A Aggie)
        Project Assistance juldex@yahoo.com
    Re: reading and returning data from a file (Tad McClellan)
        Running Perl Script as cron job : SERIOUS PROBLEM jkelly@shannon.tellabs.com
    Re: Search engine for HTML doc from the distribution. (Randy Kobes)
        Search engine help (Mind Logic)
        Secuity hole with perl (suidperl) and nosuid mounts on  <B.A.McCauley@bham.ac.uk>
        Simple Pattern Question - Newbie (Scott Hadley)
    Re: Simple Pattern Question - Newbie (Andre L.)
    Re: Simple Pattern Question - Newbie <Mukke@get2net.dk>
    Re: Verify an email address (I R A Aggie)
    Re: Which Perl reference book? (brian d foy)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 14 Jan 1999 12:14:45 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Calculating to Decimal Places
Message-Id: <l6cl77.g2c.ln@magna.metronet.com>

Artoo (r2-d2@REMOVEbigfoot.com) wrote:

: How can you calculate something to a certain number of decimal points?  eg:
: 2038/58 calculated to two decimal places rather than 14 places.


   I would probably just try it the way described in Perl FAQ, part 4.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 14 Jan 1999 13:00:22 -0500
From: Brad Warkentin <bradw@kannews.newbridge.com>
Subject: Confusion with hashes and undef
Message-Id: <op1r9sxbuq1.fsf@kannews.newbridge.com>

I am confused by how undef interacts with hashes. Consider the
following code snippet:

#!/usr/bin/perl -w
use strict;
my %hash = ("bob" => 1, "joe" => 2, "harry" => 3);
my $ref = \%hash;
print "the hash ref is : $ref \n";
undef %hash;
my $ref1 = \%hash;
print "the new hash ref is : $ref1 \n";
if (defined(%hash)) {
 print "life be good, it is defined \n";
}
else {
  print "hash be gone \n";
}

It produces:

the hash ref is : HASH(0xc8c50) 
the new hash ref is : HASH(0xc8c50) 
hash be gone 


My confusion is why I can get a reference to a hash that I have just 
undefined. The data that was stored in it is gone, and the hash itself 
is not defined, but I can still reference it. Does the fact that I
have created another reference to it, keep in around and if so how can 
I destroy it such that it cannot be referenced (I am not talking about 
destroying the data copy that may still exist in memory, just the
ability to reference the hash by its "name")?

bj


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

Date: Thu, 14 Jan 1999 14:00:12 -0500
From: "Eric Winter" <Eric.L.Winter.1@gsfc.nasa.gov>
Subject: Re: Confusion with hashes and undef
Message-Id: <77leqq$nk@post.gsfc.nasa.gov>

Brad,

    When you undef the hash, you simply empty it, so the hash variable
itself still exists. However, since the hash itself is empty, it comes up as
an undefined value. This is similar to a pointer in C - the pointer is an
address, and can have any physically possible value. However, the place that
it points to does not necessarily make any sense...

HTH
Eric Winter

wrote in message ...
>I am confused by how undef interacts with hashes. Consider the
>following code snippet:
>
>#!/usr/bin/perl -w
>use strict;
>my %hash = ("bob" => 1, "joe" => 2, "harry" => 3);
>my $ref = \%hash;
>print "the hash ref is : $ref \n";
>undef %hash;
>my $ref1 = \%hash;
>print "the new hash ref is : $ref1 \n";
>if (defined(%hash)) {
> print "life be good, it is defined \n";
>}
>else {
>  print "hash be gone \n";
>}
>
>It produces:
>
>the hash ref is : HASH(0xc8c50)
>the new hash ref is : HASH(0xc8c50)
>hash be gone
>
>
>My confusion is why I can get a reference to a hash that I have just
>undefined. The data that was stored in it is gone, and the hash itself
>is not defined, but I can still reference it. Does the fact that I
>have created another reference to it, keep in around and if so how can
>I destroy it such that it cannot be referenced (I am not talking about
>destroying the data copy that may still exist in memory, just the
>ability to reference the hash by its "name")?
>
>bj






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

Date: Thu, 14 Jan 1999 11:02:22 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help CGI times out (doc contains no data)
Message-Id: <MPG.1107df152d9bdee598998c@nntp.hpl.hp.com>

In article <7k8l77.1b7.ln@jbarchuk.tiac.net> on Thu, 14 Jan 1999 
12:13:43 -0500, jim barchuk <jb@jbarchuk.com> says...
> >    I wrote a CGI script that runs a number of processes and returns the
> > result from each to the browser..This works fine until I run a large
> > number of processes, then it times out.
> > 
> >    I suspect my server is buffering the output, otherwise I would be
> > getting an incremental result as in http://www.go2net.com
> 
> The effect you're seeing there is not an 'incremental thing', it is an
> HTML thing. The browser cannot display a TABLE until the entire TABLE
> is downloaded. That little one at the top that displays first is a
> relatively small TABLE. The rest of the page is larger/nested TABLEs,
> it just takes much longer to download it all, and the browser does
> seem to 'hesitate'.

Not a Perl solution -- an HTML solution.  Instead of using HTML tables, 
expand the tables explicitly between <PRE> and </PRE> tags.  The 
esthetics won't be great, but the display of a very long table will 
occur incrementally while the data are being downloaded to the browser.

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


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

Date: Thu, 14 Jan 1999 12:09:47 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: leading zeros
Message-Id: <btbl77.g2c.ln@magna.metronet.com>

studmail (studmail@dutwmail.wbmt.tudelft.nl) wrote:
: I am a newbee in programming with Perl and i have the following
: quastion:

: How to print numbers to a file with leading zeros?


   perldoc -f sprintf

   perldoc -f printf


      printf FILEHANDLE "%06d", 123;  # pad to 6 chars with leading zeros


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 14 Jan 1999 18:43:35 GMT
From: r-watkins@worldnet.att.net (Robert Watkins)
Subject: Looking for Perl programmer in NYC area
Message-Id: <77ldsn$p2h@bgtnsc03.worldnet.att.net>

First let me point out that we are offering money as compensation, not free 
hosting!

We are looking for a solid Perl programmer to do a couple of jobs I don't have 
time to tackle. We need someone who is also good at HTML and, preferrably, has 
some pubishing-related experience.

Please send resumis to me at:
rwatkins@springer-ny.com

Thanks,
 -- Robert

--------------------------------------
Robert Watkins
Supervising Web Developer
Springer-Verlag New York, Inc.
175 Fifth Avenue, New York, NY  10010
T (212) 460-1597 * F (212) 388-1277
--------------------------------------
http://www.springer-ny.com/
http://journals.springer-ny.com/chedr/
http://www.copernicus-ny.com/
--------------------------------------


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

Date: Thu, 14 Jan 1999 14:47:34 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Looking for Perl programmer in NYC area
Message-Id: <comdog-ya02408000R1401991447340001@news.panix.com>

In article <77ldsn$p2h@bgtnsc03.worldnet.att.net>, r-watkins@worldnet.att.net (Robert Watkins) posted:

> We are looking for a solid Perl programmer to do a couple of jobs I don't have 
> time to tackle. We need someone who is also good at HTML and, preferrably, has 
> some pubishing-related experience.

you might try the nyc-perl-jobs list:

   send to: majordomo@hfb.pm.org
   in body: subscribe nyc-perl-jobs

brought to you by the New York Perl Mongers :)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: 14 Jan 1999 19:16:59 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: max. length of perl regexp
Message-Id: <77lfrb$h8j$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Tad McClellan
<tadmc@metronet.com>],
who wrote in article <npuk77.tba.ln@magna.metronet.com>:
> : >    "A regular expression may not compile to more than 32767 
> : >     bytes internally."
> 
> : No such limit with contemporary perls (starting from 5.004_56 or somesuch).
> 
>    Then the above in perl.pod and the below in perldiag.pod
>    are bugs in the documentation?

What is below is a bug only if you *see* this diagnostic. ;-)

> =item regexp too big
> 
> (F) The current implementation of regular expressions uses shorts as
> address offsets within a string.  Unfortunately this means that if
> the regular expression compiles to longer than 32767, it'll blow up.
> Usually when you want a regular expression this big, there is a better
> way to do it with multiple statements.  See L<perlre>.

Ilya


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

Date: Thu, 14 Jan 1999 15:33:44 -0400
From: Guy Doucet <gdoucet@ait.acl.ca>
Subject: MDB files and Perl.
Message-Id: <369E4697.8A9C3875@ait.acl.ca>

We are running a Novell Web Server at the office, mainly for internal
use. It is here that I have learned Perl, or tried to learn it! I have
created a few Perl scripts (or programs?) to deal with user input
through our web site, and return HTML documents on the fly. I basically
use the Perl scripts to update a few tab-delimited text databases that I
made. It works pretty good actually.

But now, I need to create a program which will query a database through
ODBC. I'm not sure what type of database it is, but I've been told that
it can be accessed through ODBC. Does anyone know what needs to be done,
and / or, what commands would be required to query the database through
ODBC. Actually, can anyone tell me what ODBC is!

All help appreciated greatly,
Guy Doucet




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

Date: Thu, 14 Jan 1999 14:25:09 -0500
From: "Earl Childers" <childers@acns.fsu.edu>
Subject: need script or fix to mine
Message-Id: <77lg5t$cst$1@news.fsu.edu>

I need a script that will allow the downloading of any filetype (or at elast
the common ones) on a PC or Mac using Netscape or IE.   Do you know if such
a thing exists?

Or, I need to find out why some files (e.g. .avi, .mov) open Windows Media
Player when downloaded with IE, where Netscape handles the download fine by
presenting me with the "save or open" window to choose from.

I'm aware of the IE but that causes this, from a MS tech note, but I don't
know the workaround.

Really hoping to getting an answer on this!

Thanks.

--Earl




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

Date: Thu, 14 Jan 1999 13:40:21 -0500
From: Emil_Rivas@Jabil.com (Emil Rivas)
Subject: parse exception with perl/NT
Message-Id: <86E399FF181FD211BFF90000F81EE27901A9F9D9@STPMSG01>

Hi,

I am having difficulty in trying to launch a perl script from a remote NT
station through a shared drive.  Perl script runs fine on the local NT
machine and can be fired up via a batch file fine from that local machine
through the batch file.  If, however, I try to execute this batch file from
a remote machine that has the local machine's drive mapped to it, I get a
"parse exception".  I don't understand this behaviour, could anyone assist?


Further elaboration on problem here:

> Well, Emil, I am just guessing here. I presume you are on a DOS/Windows
> environment. Your remote m/c access is, i suppose,  through network drive
> mapping. If that be so, here is my understanding.
> 
	Yes, it is an NT 4.0 environment

> Suppose you have the perl script myscript.pl on m/c A in c:\Perl\bin.
> When invoked from batch file in machine A, you say it works fine.
> Now you have copied this batch file to m/c B ... and execute it ... it
> says "parse exception".
> 
	Actually its crazier than that.  The batch file resides on machine
A.  Permissions are set so that the folder where Perl and the batch file
reside are shared to machine B.  First, tried executing the script.pl and it
seemed like it couldn't the PATH to c:\Perl\bin\perl.exe was not working
across machines even though if you fired sript.pl local to A it would
automatically find perl.exe like it should.  Because of this problem then
tried to circumvent the problem by specifying Perl script.pl and this didn't
work either.  It couldn't find Perl.  Then we tried further isolating Path
issues by calling Perl through a batch file instead.  Even tried creating a
shortcut to the batch in hopes that the shortcut PIF pointing locally to
machine A would fix it.  Still no go :-( !

> The one reason that comes to my mind is m/c B is trying to look into
> **its** c:\Perl\bin for the script.
> So, check if you have a old copy of myscript.pl in m/c B's c:\Perl\bin
> directory.
> 
	Actually the box firing the script does not have Perl and shouldn't
either since it is a production box.

> If not it would be helpful to know what the parsing error is.
> 
	All these examples are carried out by running the commands at the
DOS prompt of machine B whose \\Perl\bin folder from machine A is shared as
drive P: on machine B.


	If I fire Perl_inv.bat which reads:
	.\perl.exe proc_inv.pl
	pause
	exit

	I get:

	Error:  Parse exception

	If I run perl.exe proc_inv.pl

	I get:

	Error:  Parse exception

	If I run proc_inv.pl

	I get:

	It launches wordpad to edit proc_inv.pl

	If I run proc_inv.bat which reads:

	echo off
	HELLO WORLD!!!!

	I get:

	HELLO WORLD!!!!



	Thanks,


	Emil



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

Date: 14 Jan 1999 18:35:41 GMT
From: dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
Subject: Re: Perl Criticism
Message-Id: <slrn79se7t.lmc.dformosa@godzilla.zeta.org.au>

In article <77kusq$kh$1@nnrp1.dejanews.com>, droby@copyright.com wrote:
>In article <slrn79lm8o.mtj.dformosa@godzilla.zeta.org.au>,
>  dformosa@zeta.org.au (David Formosa (aka ? the Platypus)) wrote:

[...]

>> Then have your boolean equility operator called "eq" then.
>>
>
>Or get an APL keyboard and use left-arrow for assignment.  Or emulate Algol
>and use := for assignment.

And then you can use the operator :=: to swap its arguments.



-- 
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html



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

Date: Wed, 13 Jan 1999 09:55:34 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl Criticism
Message-Id: <fl_aggie-1301990955350001@aggie.coaps.fsu.edu>

In article <77himo$3en$1@nnrp1.dejanews.com>, topmind@technologist.com wrote:

+ Are you judging Perl by its ability to project your job by
+ being too hard for a new programmer to figure out?
+ If that *is* the criteria, then you are right.

That's just so much b*llsh*t. I'm a meteorologist, I've never been
trained as a CS-type programmer, I was taught Fortran. I was exposed
to the top-down, bottom-up design/development cycle. I didn't use it
much until I started to work on my thesis, when I discovered the value
of subroutines and functions, and reusable code. I became much more
disciplined as a programmer.

Over four years ago, I picked up a book entitled "Learning Perl". I worked
my way thru it, and in a week, I was writting my own, useful perl programs.
Was I an expert? no. Was that code particularly pretty? no. Could I rewrite
them now and make them more efficient? sure. But they worked, with the only
investments being a) the cost of a book, and b) the time I took to work thru
it.

If *I* can do it, others with better formal training should be able to
do it, too.

+ Like I said before, I would not mind writing in Perl for
+ someone else, but I would not bet my own company on
+ Perl done by others because of the great risk of
+ "spehgetti code job security".

There's even better job security in doing a good job the first time
out. In my experience, if you do a good job, you get invited back.
If you do a sloppy job, or a bad job, you aren't so likely get that
invitation.

If you're not disciplined as a programmer, you're going to churn out
slipshod code.

James


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

Date: Wed, 13 Jan 1999 09:59:58 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl Criticism
Message-Id: <fl_aggie-1301990959590001@aggie.coaps.fsu.edu>

In article <77hhmt$2om$1@nnrp1.dejanews.com>, topmind@technologist.com wrote:

+  and Perlers who think
+ saving keystrokes is the ultimate goal.

Where did you get this idea from?

James - the ultimate goal is to have hubris, to be impatient, and to be
        lazy...


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

Date: Thu, 14 Jan 1999 19:17:39 GMT
From: juldex@yahoo.com
Subject: Project Assistance
Message-Id: <77lfsa$fsc$1@nnrp1.dejanews.com>

I am a final year engineering student and I have asenior project to complete
to get my BSc. My project involves web programming and I could really use
some advice and assistance. The heart of the project is that it is an on line
tutorial to teach students about telephone circuit switching. It is to have
animation showing how the switching is done and interactivity so that the
user can perform simulations on the network, by inputting different network
characteristics or the time of day when a call is made. If anyone out there
has any experience with this kind of thing please email me. It's a life and
death situation. Thank you Dexter Winter

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 14 Jan 1999 11:11:49 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: reading and returning data from a file
Message-Id: <lg8l77.a8b.ln@magna.metronet.com>

Mike O'Brien (mikeob@itas.net) wrote:
: This is a multi-part message in MIME format.
                               ^^^^^^^^^^^^^^

   Your "newsreader" is misconfigured.

   Please fix it. 

   Usenet is a plain text medium.


: How can I search a text file for | , return the numeric position, search
: for | again,return the position subtract the two and then return the
: lenght of the data inbetween the two |'s. Depending on the data's length
: I want to read it in to an scalar.

: Any ideas?

      perldoc -f index


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 14 Jan 1999 18:07:57 GMT
From: jkelly@shannon.tellabs.com
Subject: Running Perl Script as cron job : SERIOUS PROBLEM
Message-Id: <77lbpm$c9s$1@nnrp1.dejanews.com>

Hello,

I am trying to run a perl script as a cron job. The line of the crontab file
is shown below

46	17	*	*	* csh -c "<path>/txt_to_html >& /dev/null"

where txt_to_html is the Perl program.

The command runs OK from the command line but not as a cron job. I have
looked up this problem in various newsgroups etc. and have tried sourcing
 .cshrc files, .login files, .profile files un the crontab line, setting
environment variables : everything that is recommended in the newsgroups
without success. I am not using any Perl libraries / modules. I am using
Solaris 2.5.1 and perl 5.004. I would be grateful for any help that I could
get on this problem as it has me well and truly confused !!

Many Thanks,
John Kelly <jkelly@shannon.tellabs.com>.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 14 Jan 1999 19:33:28 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Search engine for HTML doc from the distribution.
Message-Id: <slrn79si69.f5i.randy@theory.uwinnipeg.ca>

On Thu, 14 Jan 1999 18:12:38 +0100, 
	Stefan Nonneman <stefan.nonneman@cec.be> wrote:
>Dear all,
>
>I recently installed PERL on my PC (under Windows NT). While working
>with it I find the HTML documentation very good, BUT...
>Is there a way to search through the whole doc set ? 
[snip]

Hi,
    There's a few things that might help:
- 'perldoc -f function' will display the documentation of the 
requested function as it appears in the perlfunc page.
-  you might consider installing perlindex, available from
	http://www.perl.com/CPAN/authors/id/ULPFR/
which is a program to index and search the perl documentation on
your system. This uses the pod or man files on your system, not
the converted html pages - if you're lacking any of the pod
files, you can grab them from the perl sources.
- there's a few places on the web that provide search facilities
on perl documentation:
	http://reference.perl.com/
	http://ls6.informatik.uni-dortmund.de/CPAN.html
	http://theory.uwinnipeg.ca/search/cpan-search.html
-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Thu, 14 Jan 1999 19:44:51 GMT
From: mike@mindlogic2.com (Mind Logic)
Subject: Search engine help
Message-Id: <369e490b$0$16677@nntp1.ba.best.com>

I'm using the Simple Search Perl script 
from http://www.worldwidemart.com/scripts/ and have encountered a problem. 
I've successfully chmoded everything, and have changed all the variables (or 
at least I think I have) to reflect the server. Here's my variables.

$basedir = '/htdocs';
$baseurl = 'http://209.240.134.108/';
@files = ('*.shtml','*.html');
$title = "Mind Logic";
$title_url = 'http://209.240.134.108/';
$search_url = 'http://209.240.134.108/search.html';

The URL for the script is at http://209.240.134.108/search.html (you can use 
multistandard.com too but the domain names isn't supposed to clear for 
another 7 hours about).

There's currently only two files on the server at 
http://209.240.134.108/index.shtml and http://209.240.134.108/test.html but 
when I type in something like test nothing shows up in the search results.

Anyone know a solution to this?


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

Date: 14 Jan 1999 17:58:15 +0000
From: Brian McCauley <B.A.McCauley@bham.ac.uk>
To: perlbug@perl.com bugtraq@netspace.org security-audit@ferret.lmh.ox.ac.uk submission@rootshell.com
Subject: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Message-Id: <u9ogo1u47c.fsf@wcl-l.bham.ac.uk>

The suid script emulation in Perl 5.0004_4 (as found in SuSE Linux 5.3
and doubtless other Linux distributions) fails to take account of the
nosuid mount option on filesystems.

This means that it is trivial for a resourceful user to hide a setuid
perl script on a CD or floppy and then use it to become root.  Many
systems are (even by default) configured to allow users mount floppys
and CDs nosuid.

The most obvious fix to Perl for this would be (where available) to
use fstatvfs() (as defined in SUSv2) to determine if the script is on
a filesystem that is mounted with the nosuid option.

Unfortunately fstatvfs() is not implemented in Linux (as of 2.2pre1).
It would not be difficult to add the new system call.  Indeed the
existing fstatfs() implementation could simply be modified to
implement fstatvfs() semantics and both syscalls could then point to
the same code.

This vulerability will exist in all Unicies that use a user-space
implementation of suid-scripts and impelment a nosuid mount option in
such a way that it does not modify the values returned by fstat().

It is worth noting that that other suid-aware script-interpreters will
probalby also display this vulnerability on Linux because of the
absense of fstatvfs().

-- 
     \\   ( )  No male bovine  | Email: B.A.McCauley@bham.ac.uk
  .  _\\__[oo   faeces from    | Phones: +44 121 471 3789 (home)
 .__/  \\ /\@  /~)  /~[   /\/[ |   +44 121 627 2173 (voice) 2175 (fax)
 .  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
  # ll  l\\  ~~~~ ~   ~ ~    ~ | http://www.wcl.bham.ac.uk/~bam/
 ###LL  LL\\ (Brian McCauley)  |


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

Date: Thu, 14 Jan 1999 18:13:18 GMT
From: ssh@cheerful.com (Scott Hadley)
Subject: Simple Pattern Question - Newbie
Message-Id: <369e32f8.161437062@news.supernews.com>

Here is what I have:

$a="Smoke.PDF\&1\&2\&3"

I want to search the string and get

a=smoke.pdf
b=1
c=2
d=3

Taking the values between the \& ...\&

You get the idea

Thanks for the help!

Steve Hedlund
ssh@dpn.com



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

Date: Thu, 14 Jan 1999 14:40:15 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Simple Pattern Question - Newbie
Message-Id: <alecler-1401991440150001@dialup-549.hip.cam.org>

In article <369e32f8.161437062@news.supernews.com>, ssh@cheerful.com
(Scott Hadley) wrote:

> Here is what I have:
> 
> $a="Smoke.PDF\&1\&2\&3"
> 
> I want to search the string and get
> 
> a=smoke.pdf
> b=1
> c=2
> d=3
> 
> Taking the values between the \& ...\&


Do a split on '\&'.

   $aa = 'Smoke.PDF\&1\&2\&3';  # let's not use $a, which is a special var

   @things = split /\\&/, $aa;  # escape that backslash

   { local $" = ', ';           # let's see what's in @things
     print "@things\n";
   }

# Result:
Smoke.PDF, 1, 2, 3

See split in perlfunc.

HTH,
Andre


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

Date: Thu, 14 Jan 1999 20:06:41 +0100
From: "Thomas Turn Jensen" <Mukke@get2net.dk>
Subject: Re: Simple Pattern Question - Newbie
Message-Id: <0Wrn2.496$aA6.1482@news.get2net.dk>

@List = split/\&1/,$a;

then you can do:
$a = List[0];
$b = List[1];
$c = List[2];
$d = List[3];

another way:
($a, $b, $c, $d) = split/%\1/,$a;

Thomas Turn Jensen

(No sig yet - had to reformat the thing and haven't had time to set
everything up yet :)


Scott Hadley skrev i meddelelsen <369e32f8.161437062@news.supernews.com>...
>Here is what I have:
>
>$a="Smoke.PDF\&1\&2\&3"
>
>I want to search the string and get
>
>a=smoke.pdf
>b=1
>c=2
>d=3
>
>Taking the values between the \& ...\&
>
>You get the idea
>
>Thanks for the help!
>
>Steve Hedlund
>ssh@dpn.com
>




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

Date: Wed, 13 Jan 1999 09:41:39 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Verify an email address
Message-Id: <fl_aggie-1301990941390001@aggie.coaps.fsu.edu>

In article <39ogo43s6b.fsf@ibnets.com>, Uri Guttman <uri@ibnets.com> wrote:

+ >>>>> "JF" == Jonathan Feinberg <jdf@pobox.com> writes:

+   >> but randal, you are not in CPAN, so do you exist?
+ 
+   JF> On the contrary!
+ 
+   cpan> a /randal/
+   JF>     Author id = MERLYN
+   JF>   EMAIL        merlyn@stonehenge.com
+   JF>   FULLNAME     Randal L. Schwartz
+ 
+ but that is only a CPAN shell of him. the one and only true randal
+ drinks beer and plays action video games. try that on CPAN.

I think this calls for a new module:

use Randal; # provides verbose explanations of errors and warnings

James - also drinks your beer :)


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

Date: Thu, 14 Jan 1999 13:11:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Which Perl reference book?
Message-Id: <comdog-ya02408000R1401991311220001@news.panix.com>

In article <369E2A01.9514B006@eml.ericsson.se>, Matt Sergeant <matthew.sergeant@eml.ericsson.se> posted:

> Can you tell me why I would want the pocket reference? Does it tell you
> more than the online docs, or is it just good for reading on the train?

it's a really good cheat sheet for the various things you'll want to
look up without carrying around a laptop or Camel, such as

   * the file test operators
   * regex syntax
   * special variable meaning

and so on.  there is very little commentary.  i, as Uri has, have 
sprinkled them liberally whereever i might be doing Perl :)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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