[8666] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2283 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 9 14:07:24 1998

Date: Thu, 9 Apr 98 11:00:36 -0700
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, 9 Apr 1998     Volume: 8 Number: 2283

Today's topics:
        (repy here)Rookie, How do I: Prompt browser to download <netadmin@critcare.lhsc.on.ca>
    Re: 5.005 <quentin.fennessy@amd.com>
    Re: @INC and avoiding -I <quentin.fennessy@amd.com>
    Re: [Q] How to extract a line at a time from a $string <quentin.fennessy@amd.com>
    Re: [Q] How to extract a line at a time from a $string (Craig Berry)
    Re: Bill Gates should be invited to O'Reilly's "Free So (Chris Nandor)
    Re: Bill Gates should be invited to O'Reilly's "Free So (Chris Nandor)
    Re: Bill Gates should be invited to O'Reilly's "Free So ben@hayamasa.demon.co.uk
    Re: calling date from a server <jamesr@aethos.co.uk.nospam>
    Re: chdir in UNIX: problem with the ~ <jamesr@aethos.co.uk.nospam>
    Re: crontab command (Joel Coltoff)
    Re: Explicit Variable Declarations <cmargoli@world.northgrum.com>
        fork and forget <jspin@mfg.sgi.com>
    Re: fork and forget (Jason C. Hill)
    Re: fork and forget <Mike_Lacey@Cargill.Com>
    Re: fork and forget (Greg Bacon)
    Re: I need latest perl for HPUX, AIX, Solaris <zzn8ptt@n8ptt.com>
        Looking for Polling/Voting CGI/java Script ateika@bellsouth.net
        Need a web login script <dschwab@wolfe.net>
    Re: Obfuscated Perl: figure this one out (Joel Coltoff)
    Re: Optimization regexp/list for string search <quentin.fennessy@amd.com>
    Re: perl win 32 :  asterisk on command line (Stuart McDow)
        RETRACTION (was Re: UNIX, system(), and text that isn't <Nathaniel.Meyers@ucop.edu>
    Re: Rookie, How do I: Prompt browser to download html f (Jason Gloudon)
    Re: Rookie, How do I: Prompt browser to download html f (Abigail)
    Re: SDBM error <quentin.fennessy@amd.com>
    Re: Strange "Modification of a read-only value attempte <rootbeer@teleport.com>
    Re: Strange "Modification of a read-only value attempte (M.J.T. Guy)
        using 'strict' and 'format' (Daniel)
        Week of Month <brankin@wested.org>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 09 Apr 1998 11:45:08 -0400
From: lawrence <netadmin@critcare.lhsc.on.ca>
Subject: (repy here)Rookie, How do I: Prompt browser to download html file as plain
Message-Id: <352CED03.BBE18474@critcare.lhsc.on.ca>

I'm pretty new to Perl/CGI and I can't seem to find how to prompt the
browsers download to save
HTML STDOUT to text.
Basically I have a script which outputs a html doc to the browser, from
a database, and I want the user to have the option of clicking a button
or somehthing and it would download the doc as plain text to their HD.

This script also creates unique temp html files, I want these files to
either delete themselves after say
an hr or delete them all at say midnight unless their under an hr old.
I'm on a NT server.
Please help!

Lawrence,
netadmin@critcare.lhsc.on.ca





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

Date: 09 Apr 1998 11:28:01 -0500
From: Quentin  Fennessy <quentin.fennessy@amd.com>
Subject: Re: 5.005
Message-Id: <ximiuoj2c4u.fsf@shaddam.tx.amd>

>>>>> "s" == stvhoof  <stvhoof@netvision.net.il> writes:

Isn't the usual answer 'On Larry's birthday'?

Or is it Chip's birthday this time?

Anyway, I expect it will be released before the leaves fall 
(some year or other).

-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: 09 Apr 1998 11:26:04 -0500
From: Quentin  Fennessy <quentin.fennessy@amd.com>
Subject: Re: @INC and avoiding -I
Message-Id: <ximk98z2c83.fsf@shaddam.tx.amd>

>>>>> "JR" == Build Administrator <bldadmin@esd.sgi.com> writes:

Check out perlfaq8, section

=head2 How do I add the directory my program lives in to the module/library search path?

-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: 09 Apr 1998 11:22:36 -0500
From: Quentin  Fennessy <quentin.fennessy@amd.com>
Subject: Re: [Q] How to extract a line at a time from a $string
Message-Id: <ximn2dv2cdv.fsf@shaddam.tx.amd>

>>>>> "Stephen" == Stephen Chan <schan_ca@rocketmail.com> writes:

    Stephen> Hello: I have a problem regarding extracting a line at a
    Stephen> time from a string.

    Stephen> $mystring="line 1\nline 2\nline 3\n"; # and so on.

Two suggestions -- I suspect you could get this information
into a list as easily as a scalar.  Rather than:

	$mystring = `ls -R`;

You could say:

	@mystrings = `ls -R`;

In the debugger this might show as (slightly chomped):
(current dir has 3 files  named a, b and c)

  DB<23> $ms = `ls`
  DB<24> @ms = `ls`
  DB<25> X ms
$ms = 'a
b
c
'
@ms = (
   0  'a'
   1  'b'
   2  'c'
)

But if you insist on operating on a scalar like this:

	@f =  split (/\n/, $ms);

Now @f is a list of lines, as separated by "\n".

	for (@f) {
	 # stuff
	}

Or	
	for ( split (/\n/, $ms)) {
	 # stuff
	}
-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: 9 Apr 1998 17:38:12 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: [Q] How to extract a line at a time from a $string
Message-Id: <6gj124$ac3$1@marina.cinenet.net>

Stephen_Chan (schan_ca@rocketmail.com) wrote:
: I have a problem regarding extracting a line at a time
: from a string.
: 
: $mystring="line 1\nline 2\nline 3\n";   # and so on.
: 
: Now I need to iterate through "$mystring" one line
: at a time, sort of speak, so that I get:
: 
: line 1\n     # I have code to do some other stuff then get line 2
: line 2\n     # I have code to do some other stuff then get line 3
: line 3\n     # I have code to do some other stuff then get the next line
: and so on

Two techniques spring to mind.  The first is good if you don't mind 
losing the \n at the end of each substring, and if the full string isn't 
gigantic:

  my @lines = split /\n/, $mystring;

At which point you can just index into or iterate over the @lines array 
as needed.

If you really want to do the job incrementally, this might be good:

  while ($mystring) {
    ($line, $mystring) = $mystring =~ /(.*?\n)(.*)/s;

    # Do processing on $line here.
  }

Note that this form requires your input to be a well-formed text file -- 
that is, there must be a \n immediately before EOF.

HTH!

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Thu, 09 Apr 1998 16:59:54 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <pudge-0904981259310001@dynamic500.ply.adelphia.net>

In article <6gi4ue$vrv$1@justus.ecc.lu>, Stefaan.Eeckels@ecc.lu (Stefaan A
Eeckels) wrote:

# I wonder if RMS ever anticipated that his 'free software' would
# be the last bastion against Microsoft?

HIS free software?

Uhhhhhh ... as important as he is, he is not the owner of the movement,
even if there is a movement.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Thu, 09 Apr 1998 16:59:52 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <pudge-0904981259290001@dynamic500.ply.adelphia.net>

In article <6ggguu$lds$1@nnrp1.dejanews.com>, ben@hayamasa.demon.co.uk wrote:

# In article <6ggdss$h5s$1@nnrp1.dejanews.com>,
#   ben@hayamasa.demon.co.uk wrote:
# 
# > (I don't know if O'Reilly's proprietory software was developed using
# > free sources: I wouldn't be surprised.)
# 
# I forgot that the O'Reilly proprietory Perl extensions (written
# by Larry Wall) here which are a good example of where O'Reilly has made
# free software into proprietory software.

What was free about it?  It did not exist.  Then it did.  Never along the
path was it ever free.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Thu, 09 Apr 1998 12:07:32 -0600
From: ben@hayamasa.demon.co.uk
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <6giv8j$hhs$1@nnrp1.dejanews.com>

In article <6ggq65$b0m$1@halcyon.com>,
  tzs@halcyon.com (Tim Smith) wrote:
>
> <ben@hayamasa.demon.co.uk> wrote:
> >O'Reilly publishes several books about free software.  O'Reilly have
> >taken several freely redistributable works and turned them into
> >proprietory works.  The best known example is the X windows
> >documentation which was taken by O'Reilly and made into proprietory
> >books with the freedoms removed.  Several other freely redistributable
> >works have been turned into books and taken out of the free realm by
> >O'Reilly.  In many cases, unlike the X windows documentation, they
> >have been killed off as freely redistributable works, so O'Reilly is a
> >company that has done some harm to free redistribution.
>
> Unless O'Reilly has hacked into assorted FTP servers and removed the
> free software, they have not killed off any free software, nor made
> it unavailable.  Rather, they have offered a non-free alternative.

Sorry, I did not write clearly enough here.

What I meant to say was that they've killed off free development of
various projects.  I don't know of an example of a free project
being removed by its authors but I know of a lot where development
of free documentation was killed after O'Reilly published a proprietory
version.

My point is that O'Reilly is a proprietory software and
publishing company which really has no more right to hold a free
software conference than Microsoft.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 8 Apr 98 15:13:47 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: calling date from a server
Message-Id: <01bd6302$3e723b40$26c0a4c1@kitkat.aethos.co.uk>

Brett <brett@moggy.com> wrote in article
<6g9fan$jtc$1@droppa.tpgi.com.au>...

> 'scuse me? How is it that you call the date from a server and place it
onto
> an HTML page? Also, can you add/subtract hours from a server's date so
that
> it matches the date in another country?
> 
> The problem is that I rent space on a server in the US, but I want to
> display Australian time on my page... how do I do it please.

I assume that you want to find out the date on the machine you are running
on...
To this you just use the perl 'time' function.

Time will report the UTC time since the epoch.

To convert this to a localtime you can use

print scalar(localtime(time));

Localtime (at least on my machine (HP D370 running HPUX 10.20)) will report
the localtime based on the timezone setting of the calling process. (which
is normally an anvironment varialbe called TZ)

Thus:
%perl
#British Summer Time / GMT
$ENV{"TZ"} = "BST0GMT";
print scalar(localtime(time));
print "\n";
#Australian Central Standard Time / Australian Central Daylight Time
$ENV{"TZ"} = "CST-9:30CDT";
print scalar(localtime(time));
print "\n";


Gives:
Wed Apr  8 16:17:21 1998
Thu Apr  9 01:47:21 1998

Easy eh?

James



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

Date: 8 Apr 98 16:12:33 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <01bd630a$747fd780$26c0a4c1@kitkat.aethos.co.uk>



Randal Schwartz <merlyn@stonehenge.com> wrote in article
<8cd8evvyni.fsf@gadget.cscaper.com>...
> >>>>> "M" == M J T Guy <mjtg@cus.cam.ac.uk> writes:
> 
> But only on systems that *have* csh -- otherwise, it falls back to
> using /bin/sh for glob expansion.  And then you don't get ~ again. :-)
> 
> And future versions of Perl will most likely *not* be calling an
> external program for expansion... meaning that only /bin/sh constructs
> will be guaranteed to work.  Caveat Executor.
> 

just as a little idea.... here's something that will do the trick for some
cases... note that its just a start (and written quickly!!), and almost
certainly not foolproof...

It looks like it handles ~/ and ~name/ though... but only at the start of
filenames...
(not ~bob/../../~john/blah, but my csh doesnt work for that one either ;-)
)

sub expand {
	local ($path) = @_;
	local ($user, $userpath);

	if ($path =~ /^\~/) {
		$path =~ /^\~(\w*)/;
		$user = $1 || (getpwuid($<))[0];
		$userpath = (getpwnam($user))[7];
		$path =~ s/^\~\w*/$userpath/;
	}
$path;
}

This may be enough for the original poster.......

James



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

Date: Thu, 9 Apr 1998 16:01:11 GMT
From: joel@wmi9.wmi.com (Joel Coltoff)
Subject: Re: crontab command
Message-Id: <6girbd$ie8@netaxs.com>

In article <352CE63D.3C0DE08B@snx.com>, Stacy Hunter  <snx@snx.com> wrote:
>
>* 10 * * * ____________/path/file.pl.
>
>Can someone help me fill in the blank?

Yes! But it's not likely to be anyone on the net. As for me I
tuck my scripts in /path_to_home/joel/shl so I would use, you guessed
it, /path_to_home/joel/shl/file.pl. If I were executing something
in /usr/local/bin. I'd use that unless I wanted cron to fail.
In that case I'd use exactly what you have above but would
eliminate some of the extra '_'. Just try using the full path
where the script lives.

-- 
Joel Coltoff

I'd explain it, but there's a lot of math. -- Calvin


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

Date: Thu, 9 Apr 1998 16:13:24 GMT
From: Charles Margolin <cmargoli@world.northgrum.com>
Subject: Re: Explicit Variable Declarations
Message-Id: <352CF3A4.7CF3@world.northgrum.com>

Faisal Karmali wrote:
> 
> Is there any way to make Perl require variables to be declared? For
> example, I recently had a problem because I misspelled a variable name.
> Rather than complaining, it creates a new variable with the misspelled
> name.
> 
Use the pragma
   use strict;
or
   use strict "vars";
along with "my" variables, explicit package global variable names
and/or the "use vars" declaration.

And make sure to use the -w option.

-- 
Charles G. Margolin                   DSSD Internal Information Services
cmargoli@world.northgrum.com          Northrop Grumman Corp. 0624/23
margolin@acm.org                      Hawthorne, California 90250-3277


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

Date: Thu, 09 Apr 1998 09:48:02 -0700
From: Joe Spinney <jspin@mfg.sgi.com>
Subject: fork and forget
Message-Id: <352CFBC1.C1C0A091@mfg.sgi.com>


--------------48143BB4B93696C7594D33D9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

I'm trying to make a perl script fire-off another perl script, but not
wait for it to terminate.  I've tried using:
    system("script_name &");
    exec("script_name");
    open(SCRIPT, "| script_name"); close(SCRIPT);

but no matter what, the parent waits for the child to fininsh.  How do I
launch the other script and forget about it?

Thanks in advance

--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
      ______________________
     /     /   /   /   /   /\  In Hang-Gliding,
     \__  /   /   /   /   /  \  the sky's the limit!
Joe      ~   /   /   /   /   /\
 Spinney    ~   /   /   /   /  \
               ~   /   /   /   /\
IT Programmer     ~   /   /   /  \
Silicon Graphics     /   /   /   /\
Mountain View, CA   /   ~   /   /  \
                   /       ~   /   /\
ph# (650)933-6966             ~   /  \
pager# (650)528-8360             ~    \
email: jspin@mfg.sgi.com           \__/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=



--------------48143BB4B93696C7594D33D9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Hi,

<P>I'm trying to make a perl script fire-off another perl script, but not
wait for it to terminate.&nbsp; I've tried using:
<BR>&nbsp;&nbsp;&nbsp; system("script_name &amp;");
<BR>&nbsp;&nbsp;&nbsp; exec("script_name");
<BR>&nbsp;&nbsp;&nbsp; open(SCRIPT, "| script_name"); close(SCRIPT);

<P>but no matter what, the parent waits for the child to fininsh.&nbsp;
How do I launch the other script and forget about it?

<P>Thanks in advance
<PRE>--&nbsp;
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ______________________
&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /\&nbsp; In Hang-Gliding,
&nbsp;&nbsp;&nbsp;&nbsp; \__&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp; \&nbsp; the sky's the limit!
Joe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /\
&nbsp;Spinney&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /\
IT Programmer&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp; \
Silicon Graphics&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp;&nbsp; /\
Mountain View, CA&nbsp;&nbsp; /&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp;&nbsp; /\
ph# (650)933-6966&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp; /&nbsp; \
pager# (650)528-8360&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~&nbsp;&nbsp;&nbsp; \
email: jspin@mfg.sgi.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \__/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=</PRE>
&nbsp;</HTML>

--------------48143BB4B93696C7594D33D9--



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

Date: Thu, 09 Apr 1998 13:18:31 -0500
From: jhill@mitre.org (Jason C. Hill)
Subject: Re: fork and forget
Message-Id: <jhill-0904981318460001@jhill-mac.mitre.org>

In article <352CFBC1.C1C0A091@mfg.sgi.com>, Joe Spinney
<jspin@mfg.sgi.com> wrote:

> --------------48143BB4B93696C7594D33D9
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> Hi,
> 
> I'm trying to make a perl script fire-off another perl script, but not
> wait for it to terminate.  I've tried using:
>     system("script_name &");
>     exec("script_name");
>     open(SCRIPT, "| script_name"); close(SCRIPT);
> 
> but no matter what, the parent waits for the child to fininsh.  How do I
> launch the other script and forget about it?
> 
> Thanks in advance

It's been a while since I've used it, but isn't the command fork() what
you're looking for?

   -Jason


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

Date: Thu, 9 Apr 1998 18:20:19 +0100
From: "Mike Lacey" <Mike_Lacey@Cargill.Com>
Subject: Re: fork and forget
Message-Id: <6gj00k$7a1@wind.cargill.com>

Joe,

I'm assuming you're on a unix box here - try

fork() && exit 0;

Mike
    Joe Spinney wrote in message <352CFBC1.C1C0A091@mfg.sgi.com>...
    Hi,
    I'm trying to make a perl script fire-off another perl script, but not
wait for it to terminate.  I've tried using:
        system("script_name &");
        exec("script_name");
        open(SCRIPT, "| script_name"); close(SCRIPT);

    but no matter what, the parent waits for the child to fininsh.  How do I
launch the other script and forget about it?





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

Date: 9 Apr 1998 17:30:04 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: fork and forget
Message-Id: <6gj0is$ad9$1@info.uah.edu>

In article <352CFBC1.C1C0A091@mfg.sgi.com>,
	Joe Spinney <jspin@mfg.sgi.com> writes:
: --------------48143BB4B93696C7594D33D9
: Content-Type: text/plain; charset=us-ascii
: Content-Transfer-Encoding: 7bit

Please, please, please.  This is Usenet, not the Web.  Save the HTML. :-(

: I'm trying to make a perl script fire-off another perl script, but not
: wait for it to terminate.  I've tried using:
:     system("script_name &");
:     exec("script_name");
:     open(SCRIPT, "| script_name"); close(SCRIPT);
: 
: but no matter what, the parent waits for the child to fininsh.  How do I
: launch the other script and forget about it?

I'm truly surprised that using system didn't work (I've used that
solution myself several times (and on SGI machines! :-)).  Could you
perhaps post some code that you've tried that lead you to believe
it wasn't doing what you expected?

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: 9 Apr 1998 14:59:20 GMT
From: "Ken C" <zzn8ptt@n8ptt.com>
Subject: Re: I need latest perl for HPUX, AIX, Solaris
Message-Id: <01bd63c8$5fe082c0$0201a8c0@kdc1.n8ptt.com>

For HP-UX look at
http://hpux.cs.utah.edu/hppd/hpux/Languages/perl-5.004_04/
It's even in depot format. Runs fine on my 10.20 system.

-- 
Ken C. - CNE
remove zz's for reply
"Windows 95, the most installed system in the world,
I know, I've done it 5 or 6 times myself"



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

Date: Thu, 09 Apr 1998 11:37:23 -0600
From: ateika@bellsouth.net
Subject: Looking for Polling/Voting CGI/java Script
Message-Id: <6gitg3$fah$1@nnrp1.dejanews.com>

Looking for Polling/Voting CGI/java Script

I am looking for a script that will enable polling but disallow users from
voting more than once from the same PC. A cgi Script/Java/Java Script Will do.
Any assistance will be very much appreciated.

Ateika
<<ateika@bellsouth.net>>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 09 Apr 1998 10:31:29 +0100
From: David Schwab <dschwab@wolfe.net>
Subject: Need a web login script
Message-Id: <352C9571.FD3BAB78@wolfe.net>

Yes I need a weblogin script that allows people to pass a login and
password thru a prompt and then have another way for an admin to add
users and remove something like .Htaccess please help if you can.
Thanks



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

Date: Thu, 9 Apr 1998 16:05:39 GMT
From: joel@wmi9.wmi.com (Joel Coltoff)
Subject: Re: Obfuscated Perl: figure this one out
Message-Id: <6girjp$isp@netaxs.com>

In article <1d77nwl.wh563cczomN@slip166-72-108-50.ny.us.ibm.net>,
Kevin Reid <kpreid@ibm.net> wrote:
>> 
>> Looks like attemps to print out your entire diskdrive.
>
>When I run it, it only prints a little bit out.
>

That could happen on some systems if the file isn't set to binmode().


-- 
Joel Coltoff

I'd explain it, but there's a lot of math. -- Calvin


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

Date: 09 Apr 1998 11:12:01 -0500
From: Quentin  Fennessy <quentin.fennessy@amd.com>
Subject: Re: Optimization regexp/list for string search
Message-Id: <ximogyb2cvi.fsf@shaddam.tx.amd>

>>>>> "Herve" == herve debar <herve_debar@hotmail.com> writes:

    Herve> Hi, I have the following problem. I receive strings, and i
    Herve> keep them only if i haven't seen them previously. Right
    [...]

I think what you are looking for can be best/most-perlishly solved
by hashes:

	while (<>) {
		# transform $_ to a useful form (split, tr, s/, etc)
		$input = (split)[3];

		# skip processing if $input has already been seen.
		next if $seen{$input};

		# note that $input has been seen
		$seen{$input}++;

		# process the line...
	}

The hash %seen  now includes entries for each unique $input
you have seen, including a reference count for each.

Use normal hash techniques for listing or analyzing strings
that have been seen.  Too many seens in this message, I think.
-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: 9 Apr 1998 16:03:39 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: perl win 32 :  asterisk on command line
Message-Id: <6girgr$l9m$1@ns1.arlut.utexas.edu>

drummj@mail.mmc.org (Jeffrey R. Drumm) writes:
> 
> One who has worked in the Unix world will find the lack of features
> such as alarm(), fork(), decent redirection, the need for binmode(),
> etc. to be virtually crippling.

Indeed. What *was* Microsoft thinking?

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
  "It is obvious that about 750,000 people ago, Austin was a wonderful City."


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

Date: Thu, 09 Apr 1998 10:41:21 -0700
From: Nathaniel Meyers <Nathaniel.Meyers@ucop.edu>
Subject: RETRACTION (was Re: UNIX, system(), and text that isn't output.)
Message-Id: <352D0841.94F10FA6@ucop.edu>

Oops.  Turns out my error problems had nothing to do with the command's
display (STDERR, which would have just been ignored which would have been
fine). Still don't know where my errors lie but I do know it has nothing to
do with perl or UNIX.

I'm terribly sorry (and embarrassed)
-Nathaniel Meyers


Nathaniel Meyers wrote:

> This is a stupid UNIX question and I'm angry at myself for not knowing
> the answer but sheesh...
>
> Sometimes UNIX commands write to the screen and this is not regular
> output (usually error or status messages).  For instance 'ls gooby' will
> result in 'gooby: No such file or directory'.  This isn't "output" and
> so far as I know it can not be captured or forced off.  So what is this
> sort of text refered as and how do you force it to not occur?
>
> This doesn't just occur when there is an error.  Using PGP to encrypt a
> file ('pgpe -r meyers@wahoo.sjsu.edu file1 -o file.pgp') writes a
> "Creating ouput file" line to the screen.
>
> Here's my problem.  I want to write a cgi script that in its execution
> does a system command but the system command (the pgp example) writes
> the @#&% "Creating output file" line which causes the web server out and
> give a server error message every single time.
>
> Is there anyway to tell perl (or UNIX) to ignore these comments?
>
> Nathaniel Meyers
> Nathaniel.Meyers@ucop.edu





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

Date: Thu, 09 Apr 1998 16:47:08 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Rookie, How do I: Prompt browser to download html file as plain text/auto del files on NT
Message-Id: <slrn6ipuna.b3.jgloudon@manitoba.bbn.com>

defaultuser <defaultuser@lhsc.on.ca> wrote:
>I'm pretty new to Perl/CGI and I can't seem to find how to prompt the

This isn't a Perl question. Repost this to comp.infosystems.www.*.
>browsers download to save
>HTML STDOUT to text.

This isn't a Perl question. Repost this to comp.infosystems.www.*.

-- 
Jason Gloudon


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

Date: 9 Apr 1998 17:31:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Rookie, How do I: Prompt browser to download html file as plain text/auto del files on NT
Message-Id: <6gj0mc$l12$1@client3.news.psi.net>

defaultuser (defaultuser@lhsc.on.ca) wrote on MDCLXXXII September
MCMXCIII in <URL: news:352CEBD2.82859BB3@lhsc.on.ca>:
++ I'm pretty new to Perl/CGI and I can't seem to find how to prompt the
++ browsers download to save
++ HTML STDOUT to text.
++ Basically I have a script which outputs a html doc to the browser, from
++ a database, and I want the user to have the option of clicking a button
++ or somehthing and it would download the doc as plain text to their HD.

That's an option I've seen in all browsers I've seen in the past years.
That has nothing to do with Perl, CGI or HTML.

++ This script also creates unique temp html files, I want these files to
++ either delete themselves after say
++ an hr or delete them all at say midnight unless their under an hr old.

Run a find command from a cron job.

++ I'm on a NT server.

*comfort*


Now, what are your Perl questions?



Abigail
-- 
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
           print+Just (), another (), Perl (), Hacker ();'


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

Date: 09 Apr 1998 11:23:39 -0500
From: Quentin  Fennessy <quentin.fennessy@amd.com>
Subject: Re: SDBM error
Message-Id: <ximlntf2cc4.fsf@shaddam.tx.amd>

>>>>> "Rui" == Rui Guo <ruig@ece.nwu.edu> writes:

    Rui> I got an error when I run this following program:

What error do you get?

-- 
Quentin Fennessy			AMD, Austin Texas
Secret hacker rule #11 - hackers read manuals


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

Date: Thu, 9 Apr 1998 09:03:21 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: James A Squire 312 M 193884 <james.a.squire@boeing.com>
Subject: Re: Strange "Modification of a read-only value attempted" error
Message-Id: <Pine.GSO.3.96.980409085858.9100L-100000@user2.teleport.com>

On Thu, 9 Apr 1998, James A Squire 312 M 193884 wrote:

> Any other possibilities?

Don't make us keep guessing! :-)  Boil down the problem to make a short
example, then post that. (My guess: You're using $_ , probably in a sub,
without first localizing it, and that code is being called inside a
foreach loop iterating over a computed expression. But that's just a wild
guess.... :-) 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 9 Apr 1998 17:25:05 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Strange "Modification of a read-only value attempted" error
Message-Id: <6gj09h$h0r$1@lyra.csx.cam.ac.uk>

James A Squire 312 M 193884  <james.a.squire@boeing.com> wrote:
>
>In the meantime, if I "use diagnostics" as was suggested in the WELCOME
>message I got after my first post to this group, will perl actually tell
>me which entity on line 302 (or whatever) it thinks is the read-only
>value instead of just giving me the line number?  That additional
>information might help me.  I'm just guessing it was talking about the
>array, but I could be wrong.

No.  I'm afraid Perl currently doesn't remember which the offending value was.
Your best hope is to run under the debugger, setting a breakpoint at
the offending line.   Then sniff at each of the values involved to try
to identify the culprit.


Mike Guy


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

Date: 9 Apr 1998 17:39:09 GMT
From: daniel.mendyke@digital.com (Daniel)
Subject: using 'strict' and 'format'
Message-Id: <6gj13t$eob$1@nntpd.lkg.dec.com>


When I try to use strict in a script which also defines one or 
more formats Perl complains about barewords.  

How can I use printed formats while using strict?

-Daniel




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

Date: Thu, 09 Apr 1998 10:40:12 -0700
From: Brian Rankin <brankin@wested.org>
Subject: Week of Month
Message-Id: <352D07FC.B4EA94BF@wested.org>

I need to calculate the week of month for any given date, i.e.:

April 5 = week1
April 12 = week 2
April 19 = week 3
April 26 = week 4

I've done this thru a rather clumsy script; any better scripting ideas
would be greatly appreciated:

use Date::Manip;
$now_string= localtime;
$now_string=&DateCalc("7 days ago", $now_string, \$err);
$wday = UnixDate($now_string, '%d');
## get week of month in $num
$test=$wday/7;
($num, $extra) = split(/\./, $test);
if ($extra) { $num++; }

Brian Rankin




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

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

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