[11035] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4635 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 13 01:02:48 1999

Date: Tue, 12 Jan 99 22:00:29 -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           Tue, 12 Jan 1999     Volume: 8 Number: 4635

Today's topics:
    Re: "Email this page to a friend" script (Christopher Schulte)
        [Q] Saving STDOUT to a logfile <matthewb@mdhost.cse.tek.com>
    Re: [Q] Saving STDOUT to a logfile <rick.delaney@home.com>
    Re: [Q] Saving STDOUT to a logfile <damian@infoxchange.net.au>
    Re: A really easy string question <ajonsson@csi.com>
    Re: A really easy string question <damian@infoxchange.net.au>
    Re: A really easy string question (Ronald J Kimball)
    Re: Array problem (Tad McClellan)
    Re: associative arrays (hashes) (Ronald J Kimball)
    Re: CGI.pm Warnings <neiled@enteract.com>
        Comments Solicited on Performance of DB_File <neiled@enteract.com>
        coredump & other weirdness with eval(require) (Steve Leibel)
    Re: coredump & other weirdness with eval(require) (Ronald J Kimball)
    Re: Easy question... <ajonsson@csi.com>
    Re: Easy question... <rick.delaney@home.com>
    Re: Generating a unique number (Ronald J Kimball)
    Re: global search and replace in files (Tad McClellan)
        Help with Pattern Matching <s6606555@np.edu.sg>
    Re: Help with Pattern Matching <ebohlman@netcom.com>
    Re: help (Clay Irving)
    Re: help (Tad McClellan)
    Re: How can I compare two arrays? <uri@home.sysarch.com>
    Re: How to stop perldoc scroll on find? <ebohlman@netcom.com>
    Re: NEED SCRIPT BAD!!!!!! (Martien Verbruggen)
    Re: NEED SCRIPT BAD!!!!!! (Tad McClellan)
    Re: Newbie desperation <dumpms@gate.net>
    Re: Newbie desperation <design@raincloud-studios.com>
        Parsing the name from a form field name=Smith <evanp@technologist.com>
    Re: Perl and LDAP <tterry@pbi.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 13 Jan 1999 05:25:24 GMT
From: usenet@schulte.org (Christopher Schulte)
Subject: Re: "Email this page to a friend" script
Message-Id: <369d2ccc.354973217@news.schulte.org>

God, I was watching my http logs and I saw access after aches from a
client that called itself "email syphon" or something.  They were
following every single link on my site (and I have thousands of
documents)

I had to act fast, and define a quick firewall profile that totally
blocked their IP from my network.  I had it in place within like 2 or
3 minutes, but the damage was done.  The asshole syphoned like 100
pages. So, I did a whois, and made a long distance call to the network
admin, demanding that I be removed from his list.

He knew exactly what I was taking about when I started to explain the
situation, "Yes, I see a machine on your network pulling email
addresses from my network... and I need you to REMOVE me from your
database right now."

"Ok, what's the domain in question.." etc... etc...

SPAMMERS must die.  I wonder if I should report this to the RBL?  What
do you think?

On 12 Jan 1999 11:53:20 +0000, Piers Cawley <pdcawley@bofh.org.uk>
wrote:

>Unless you're after capturing a whole bunch of email addresses. But I
>can't think why you'd want to do such a thing.

--
Christopher Schulte

Replace usenet with chris to send mail.
Mail sent to usenet@schulte.org
will *never* get to me. I hate spam!


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

Date: Tue, 12 Jan 1999 19:04:25 -0800
From: Matt Berney <matthewb@mdhost.cse.tek.com>
Subject: [Q] Saving STDOUT to a logfile
Message-Id: <369C0D39.DFC8A98A@mdhost.cse.tek.com>

I have created an automated build script in perl that executes our build
process.  But, I want to keep all the output that goes to STDOUT and save it to
a file.  This way, I can fire off the script and review the output later.

Can some one help me with the command invocation?

Please respond via email.

Thanks,

Matt

-- 
==============================================================
Matt Berney                         email: Matt.Berney@Tek.Com
Measurement Business Division       Phone: (503) 627-6512
Tektronix, Inc.                     Fax:   (503) 627-5610
==============================================================


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

Date: Wed, 13 Jan 1999 05:29:30 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: [Q] Saving STDOUT to a logfile
Message-Id: <369C3108.ED60B3BB@home.com>

[posted & mailed]

Matt Berney wrote:
> 
> I have created an automated build script in perl that executes our 
> build process.  But, I want to keep all the output that goes to STDOUT 
> and save it to a file.  This way, I can fire off the script and review 
> the output later.
>
> Can some one help me with the command invocation?

perldoc -f open

But in this case can you not just redirect the output from the command
line?

$ perl -w yourscript > logfile

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Wed, 13 Jan 1999 16:51:01 +1100
From: "Damian" <damian@infoxchange.net.au>
Subject: Re: [Q] Saving STDOUT to a logfile
Message-Id: <916206650.64156@atlas.onthe.net.au>

>I have created an automated build script in perl that executes our build
>process.  But, I want to keep all the output that goes to STDOUT and save
it to
>a file.  This way, I can fire off the script and review the output later.
>


man perlfunc ...

#!/usr/bin/perl
open(SAVEOUT, ">&STDOUT");
open(SAVEERR, ">&STDERR");

open(STDOUT, ">foo.out") || die "Can't redirect stdout";
open(STDERR, ">&STDOUT") || die "Can't dup stdout";

select(STDERR); $| = 1;     # make unbuffered
select(STDOUT); $| = 1;     # make unbuffered

print STDOUT "stdout 1\n";  # this works for
print STDERR "stderr 1\n";  # subprocesses too

close(STDOUT);
close(STDERR);

open(STDOUT, ">&SAVEOUT");
open(STDERR, ">&SAVEERR");

print STDOUT "stdout 2\n";
print STDERR "stderr 2\n";






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

Date: Tue, 12 Jan 1999 21:43:14 -0600
From: "AJ" <ajonsson@csi.com>
Subject: Re: A really easy string question
Message-Id: <OQGKEbqP#GA.279@nih2naaa.prod2.compuserve.com>

One way would be to go:
@variable = split(/\//, $pathname);
@filename = grep(/[.txt]/,@variable);

$filename[0] will be "myfile.txt"

But hey, this is Perl. There's lots of ways.

AJ

info@gadnet.com wrote in message <369ba4f0.9065131@news.newsguy.com>...
>I'm new to this perl lark and struggling to do the following:
>
>I have a variable ($variable) which contains:
>
>$pathname = "/path-of-indeterminate-length/myfile.txt";
>
>I want to end up with a variable that contains:
>
>myfile.txt
>
>I can do it as follows:
>
>$variable = substr($variable,12);
>chop($variable);
>chop($variable);
>
>But there has to be a neater way.
>
>Any ideas?
>
>




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

Date: Wed, 13 Jan 1999 16:25:12 +1100
From: "Damian" <damian@infoxchange.net.au>
Subject: Re: A really easy string question
Message-Id: <916205105.845313@atlas.onthe.net.au>

>One way would be to go:
>@variable = split(/\//, $pathname);
>@filename = grep(/[.txt]/,@variable);
>
>$filename[0] will be "myfile.txt"
>
>But hey, this is Perl. There's lots of ways.
>

Or maybe even something like this...

  $pathname =~ s#.*/##;

Or if you want to change the variable name at the same time...

  ($filename = $pathname) =~ s#.*/##;



>>I have a variable ($variable) which contains:
>>
>>$pathname = "/path-of-indeterminate-length/myfile.txt";
>>
>>I want to end up with a variable that contains:
>>
>>myfile.txt
>>
>>I can do it as follows:
>>
>>$variable = substr($variable,12);
>>chop($variable);
>>chop($variable);
>>
>>But there has to be a neater way.
>>
>>Any ideas?
>>
>>
>
>




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

Date: Wed, 13 Jan 1999 00:51:57 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: A really easy string question
Message-Id: <1dljohp.1pmo3gb1w28utiN@bay1-357.quincy.ziplink.net>

AJ <ajonsson@csi.com> wrote:

> One way would be to go:
> @variable = split(/\//, $pathname);
> @filename = grep(/[.txt]/,@variable);
> 
> $filename[0] will be "myfile.txt"

$pathname = '/i/wouldnt/be/so/sure/about/that.txt';

If you split on the path separator, there's a good chance that the
filename will be the last element in the array.  grep() is not the best
method for getting the last element in an array.

> But hey, this is Perl. There's lots of ways.

And some of them even work!

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 12 Jan 1999 22:27:57 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Array problem
Message-Id: <dc7h77.sq.ln@magna.metronet.com>

Rafiq Mateen (rafiqmateen@netscape.net) wrote:
: This is a multi-part message in MIME format.
                               ^^^^^^^^^^^^^^

   Please don't do that.

   Usenet is, and always has been, a text only medium.

   Using MIME decreases the number of people who will see
   your question (it is often a killfile rule)

: I have two arrays I need to combine together examples below.

: @one:
: here we are now at
: one two  three four
: it is time to go
: five six seven eight

: @two:
: 1654 just go no
: jordan retired wow
: now what is up
: 56 19200 net of the


: They are both single dimensional arrays

: I need them to look like this when combined:

: here we are now at  1654 just go no
                    ^^
                    ^^  two spaces
: one two  three four jordan retired wow
                     ^
                     ^ one space
: it is time to go    now what is up
                  ^^^^
                  ^^^^ four spaces
: five six seven eight 56 19200 net of the
                      ^
                      ^ one spac3

: HELP!!!!!!


HELP! I'm having trouble discerning the pattern there...

Guess I'll just go with a single space between them:


   die "elements don't match up" unless @one == @two;

   foreach ($i=0; $i<@one; $i++) {
      print "$one[$i] $two[$i]\n";
   }


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


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

Date: Wed, 13 Jan 1999 00:31:03 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: associative arrays (hashes)
Message-Id: <1dljiow.lq709m1fd14dcN@bay1-357.quincy.ziplink.net>

<bluepuma@mailexcite.com> wrote:

> I want to use an associative array with IP addresses as index.
> 
> $ip1="123.456.123.456";
> $ip2="123.123.123.123";
> 
> %no=();
> $no[$ip1]=1;
> $no[$ip2]++;
> print $no[$ip1];
> 
> But it results in "2", cause perl only takes the first number
> of the IP address as index. How can I change that ?

If you want to use an associative array, use curly braces for the index.
Square brackets are for regular arrays, whose indexes are integers.

$ip1="123.456.123.456";
$ip2="123.123.123.123";

%no=();
$no{$ip1}=1;
$no{$ip2}++;
print $no{$ip1]};


A reading of perldata appears to be in order.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 12 Jan 1999 23:09:30 -0600
From: "Neil Edmondson" <neiled@enteract.com>
Subject: Re: CGI.pm Warnings
Message-Id: <77h9re$r77$1@eve.enteract.com>


austin@mathworks.com wrote in message <77fkff$q26$1@turing.mathworks.com>...
>In comp.lang.perl.modules dave@mag-sol.com wrote:
>
>> To get round it, put values in single quotes when using it as a hash key.
>
>Or use -value instead of -values .

single quotes work fine ... -value gives me the same warning.  -style also
falls victim .... so i think from now on I'm just going to put the single
quotes around 'em all - if I remember.

Thanks, Neil
>
>- Austin




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

Date: Tue, 12 Jan 1999 23:21:45 -0600
From: "Neil Edmondson" <neiled@enteract.com>
Subject: Comments Solicited on Performance of DB_File
Message-Id: <77haid$rt7$1@eve.enteract.com>

I find the following approach neat, however, should I be concerned about
performance when subsequently accessing this file?  Each key is fairly
short, the value could be up to 2K bytes.

I anticipate getting maybe 4-5000 records, with maybe 3 hits in a single run
of a CGI script.

Apache and FreeBSD.

TIA, Neil

##############################
#
sub WriteToDB {
 my ($CGI,$key,$db_file) = @_;
 $key = lc($key);
 # stringify the CGI
 my $CGI_string = $CGI->query_string;
 my %db;
 tie (%db, "DB_File", $db_file) ||
   print "Can't open the database $db_file $!<p>\n";
 $db{$key} = $CGI_string;
 if ($DEBUG) {
  print "<br>Record Now Exists in $db_file" if (exists $db{$key});
  print "<br><b>Key:</b> $key <br><b>Value:</b> $CGI_string <br>";
 }
 untie %db;
}
############################




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

Date: Tue, 12 Jan 1999 19:57:45 -0800
From: stevel@coastside.net (Steve Leibel)
Subject: coredump & other weirdness with eval(require)
Message-Id: <stevel-1201991957450001@dnai-207-181-236-15.dialup.dnai.com>

Hello,

I need to be able to "require" a file whose name is not known until runtime.

In order to trap user errors (bad syntax in the file) I'm putting the
require inside an eval.

I am having problems when the file to be required does not return true. 
For example, if "emptyfile" is an empty file, the following coredumps:

    #!/usr/local/bin/perl
    use strict;

    xx();

    sub xx {
    my $file = "emptyfile";

    my $code = "require " . "\"" . $file . "\"";
    print "code = $code\n";

    my  $result = eval $code;
}

This is on BSD/OS 4.0, with perl 5.004_02.  

With other variations on the above theme I get mysterious and nonsensical
errors such as "modification of read-only array attempted" or "bizarre
copy," indicating that the parser is seriously confused.

*  Is this a bug or a feature?  Does it happen on other Unices besides BSD?
*  What is the approved way to pull in a file at runtime for subsequent
execution of its subroutines?
*  Any other advice or suggestions greatly appreciated.

Thanks,

Steve L
stevel@coastside.net


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

Date: Wed, 13 Jan 1999 00:51:58 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: coredump & other weirdness with eval(require)
Message-Id: <1dljorf.4kddvvpdbgzkN@bay1-357.quincy.ziplink.net>

Steve Leibel <stevel@coastside.net> wrote:

> I am having problems when the file to be required does not return true.
> For example, if "emptyfile" is an empty file, the following coredumps:

I don't know why you're getting a coredump when you try to require an
empty file in an eval (it dumps core for me too), but as a workaround,
you could check the file size first and skip the eval if it's zero.

[BTW, comp.lang.perl does not exist.]

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 12 Jan 1999 22:26:21 -0600
From: "AJ" <ajonsson@csi.com>
Subject: Re: Easy question...
Message-Id: <#mkcKzqP#GA.391@nih2naaa.prod2.compuserve.com>

This will check for that condition

if(($variable=~/[A-Z]/i) == 0) { [statement]
}

This checks for the presence of Alpha characters, which will return a
nonzero result if
there are any.

AJ

news.rogers.ca wrote in message <777vuk$2el$1@news.on>...
>In perl, how do I do an IF statement to make sure a variable is only
>digits... not chars (like isalpha() / isdigit())
>
>ie: if ( isdigit($variable) )
>
>Thanks,
>
>Luc,
>luc2@travelpod.com
>
>




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

Date: Wed, 13 Jan 1999 05:48:39 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Easy question...
Message-Id: <369C357D.4BFF5448@home.com>

[posted & mailed]

AJ wrote:
> 
> if(($variable=~/[A-Z]/i) == 0) { [statement]
> }
> 
> This checks for the presence of Alpha characters, which will return a
> nonzero result if
> there are any.

The nonzero result you refer to is guaranteed to be true so there is no
need to check equality with 0.  If you want to check that the match
failed then use the negated binding operator.

if( $variable !~ /[A-Z]/i ) {
    print "no alpha\n";
}

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Wed, 13 Jan 1999 00:31:04 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Generating a unique number
Message-Id: <1dljiz5.19o04e2iwviwwN@bay1-357.quincy.ziplink.net>

Daniel <daniel.mendyke@digital.com> wrote:

> I'm looking for a way to assign truely unigue id numbers
> to each visiter to a web site.  I'd like to use charators as well
> as numbers and keep the number of digits to eight.

Have you considered using a plain old web counter?

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 12 Jan 1999 22:04:39 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: global search and replace in files
Message-Id: <n06h77.sq.ln@magna.metronet.com>

John Cody (jcody@triibune.com) wrote:

: I'm just starting out with perl, 


   Thousands of people have gone before you.


: and have gotten stuck on this one.  


   Thousands of people have gone before you.


: I'm
: trying to open an existing file, search for a string, and replace it in the
: same file.


   ... so many in fact, that common questions along with validated
   answers have been collected into one common place for easy
   reference.

   Of course, you have to refer to them to get them...



   Perl FAQ, part 4

      "How do I change one line in a file/
       delete a line in a file/
       insert a line in the middle of a file/
       append to the beginning of a file?"


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


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

Date: 13 Jan 1999 11:04:33 +0800
From: "Y.K. Goh" <s6606555@np.edu.sg>
Subject: Help with Pattern Matching
Message-Id: <369c0d41.0@nsuxnews>


I've been trying to parse an electronic dictionary with a HTML
format without success using Perl.

Basically, it uses markup tags like HTML to mark out the various
parts of an entry in it. For example, one line goes like this:

<hw>Word</hw><pos>n.</pos><def>Here's the definition.</def><pos>v.</pos>

The word(s) between the <hw> and </hw> tag is/are the headword, 
or simply the word to be defined.

Anything between a <pos> and </pos> is the word class (noun, 
adverb, adjective etc.)

The definition of the word is between <def> and </def>.

What I want is all the word class e.g. all the words between
<pos> and </pos>. Some words have multiple word classes such as
the example above.

I use the pattern /<pos>.*<\/pos/ in an attempt to extract the
word class. It works fine if the word has only 1 word class.

Since Perl pattern matching is greedy, it will parse it 
incorrectly if the word has multiple word classes as above. Since
the definition is between the first <pos> and the last </pos>, it
too gets matched together with the word classes.

Is there a way to extract all the word classes in a line while
leaving out the definition?
 ------------------------------
Yong-Kwang Goh
Ngee Ann Polytechnic
The Centre for Computer Studies

Email: s6606555@np.edu.sg
 ------------------------------


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

Date: Wed, 13 Jan 1999 03:38:33 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Help with Pattern Matching
Message-Id: <ebohlmanF5HBG9.CIq@netcom.com>

Y.K. Goh <s6606555@np.edu.sg> wrote:
: I've been trying to parse an electronic dictionary with a HTML
: format without success using Perl.

: Basically, it uses markup tags like HTML to mark out the various
: parts of an entry in it. For example, one line goes like this:

: <hw>Word</hw><pos>n.</pos><def>Here's the definition.</def><pos>v.</pos>

[snip]

: I use the pattern /<pos>.*<\/pos/ in an attempt to extract the
: word class. It works fine if the word has only 1 word class.

: Since Perl pattern matching is greedy, it will parse it 
: incorrectly if the word has multiple word classes as above. Since
: the definition is between the first <pos> and the last </pos>, it
: too gets matched together with the word classes.

Well, you could always use a non-greedy match (/<pos>.*?<\/pos/) which 
should work fine for your example.  Seriously, though, I'd consider using 
HTML::Parser (which doesn't have any HTML DTD wired into it, so it can 
parse generic tagged structures) or even XML::Parser (which will require 
your document to be well-formed XML; your example isn't because there's 
no element enclosing the whole thing).



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

Date: 13 Jan 1999 03:16:02 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: help
Message-Id: <77h35i$e18$1@news.panix.com>

In <77gjdj$jn1$1@ultra.sonic.net> "Gala Grant" <gala@sonic.net> writes:

>I know that this isn't the place to post CGI questions, but I don't know
>where that place is.  Can anyone help me?

Down the hall. First door to the left.

[panix] ~% grep cgi .newsrc
comp.infosystems.www.authoring.cgi!

-- 
Clay Irving
clay@panix.com


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

Date: Tue, 12 Jan 1999 22:15:54 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: help
Message-Id: <ql6h77.sq.ln@magna.metronet.com>

Gala Grant (gala@sonic.net) wrote:
: I know that this isn't the place to post CGI questions, but I don't know
: where that place is.  Can anyone help me?

   comp.infosystems.www.advocacy
   comp.infosystems.www.announce
   comp.infosystems.www.authoring.cgi
   comp.infosystems.www.authoring.html
   comp.infosystems.www.authoring.images
   comp.infosystems.www.authoring.misc
   comp.infosystems.www.browsers.mac
   comp.infosystems.www.browsers.misc
   comp.infosystems.www.browsers.ms-windows
   comp.infosystems.www.browsers.x
   comp.infosystems.www.misc
   comp.infosystems.www.servers.mac
   comp.infosystems.www.servers.misc
   comp.infosystems.www.servers.ms-windows
   comp.infosystems.www.servers.unix
   comp.infosystems.www.providers
   comp.infosystems.www
   comp.infosystems.www.users


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


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

Date: 12 Jan 1999 23:24:58 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: How can I compare two arrays?
Message-Id: <x7pv8jhk9x.fsf@home.sysarch.com>

>>>>> "IZ" == Ilya Zakharevich <ilya@math.ohio-state.edu> writes:

  >> You cannot garantee O (1). Worst case insertion/query time is Omega (n).
  >> "Linear effects" due to chaining don't have to do with the hash being
  >> full, but with many keys hashing to the same bucket. 

  IZ> ... which might have happened quite often with the "old" Perl hashing
  IZ> function, which was very non-"random", or, at least, it was assigning
  IZ> very non-"random" buckets.  The new function (more precise, the new
  IZ> way to map the old function to buckets) has much better chance to get
  IZ> a "flat" distribution of keys over buckets in real application.

  IZ> The transition happened circa 5.005_53.

which doesn't help many people who are not using the maintenance track
versions. when will such bleeding edge improvements migrate to
production versions? and when will 5.005_xx be considered stable (even
without threads) by the masses. i know several places that won't go near
5.005 because of FUD and other issues. it has a bad rep (possibly due to
the threads debacle)

i have 5.005_02 installed at home but the primary perl here is
5.004_04. i use .005 to try out the features but i don't code for
them. my workplaces all have 5.004 or so.

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Wed, 13 Jan 1999 02:50:17 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How to stop perldoc scroll on find?
Message-Id: <ebohlmanF5H97t.9Kn@netcom.com>

Matthew Bafford <dragons@scescape.net> wrote:
: I've found that on Win9x the piping doesn't always work the way it 
: should.  When using perldoc, I've found:

: perl -e "print `perldoc -f blah`" | more

: to work.  It's twisted, but so is Microsoft.

AFAICT, the screwy behavior of perldoc under Win95 is mainly due to the 
batch-file wrapper around it.  Simply extracting the Perl source from 
perldoc.bat and invoking it with 'perl perldoc ...' gets rid of the 
annoyances (like not being able to redirect output).



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

Date: Wed, 13 Jan 1999 02:24:54 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: NEED SCRIPT BAD!!!!!!
Message-Id: <WtTm2.111$6e.8545@nsw.nnrp.telstra.net>

In article <369cd930.31856682@news.flash.net>,
	mineral@flash.net (buddy gripple) writes:
> hi,
> i was wondering if anyone knows if there is a script somewhere that
> will take input entered by a user into a form text field and turn it

use CGI;

> into a .txt document with a filename that i can choose. i also need
> that .txt to AUTOMATICALLY OVERWRITE the current one if it exists.

# set $fname to whatever you want it to be
open(FOUT ">$fname") || die "Cannot open $fname for write: $!"

> does that make any sense? 

sure.

> is there any way to do that?

See above.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: Tue, 12 Jan 1999 22:18:43 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: NEED SCRIPT BAD!!!!!!
Message-Id: <3r6h77.sq.ln@magna.metronet.com>

buddy gripple (mineral@flash.net) wrote:

: i was wondering if anyone knows if there is a script somewhere that
: will take input entered by a user into a form text field and turn it
: into a .txt document with a filename that i can choose. i also need
: that .txt to AUTOMATICALLY OVERWRITE the current one if it exists.
: does that make any sense? is there any way to do that? can ANYONE help
: me pleeeeeeaaaassssseeeee...


   open(OUT, ">$filename_that_i_can_choose.txt") ||
      die "could not open '$filename_that_i_can_choose.txt'  $!";
   print $form{input_entered_by_a_user};
   close(OUT);


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


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

Date: Tue, 12 Jan 1999 21:43:10 -0800
From: "dump microsoft now!" <dumpms@gate.net>
Subject: Re: Newbie desperation
Message-Id: <369C326E.6667@gate.net>

Thomas Klinger wrote:
> 
> I'm really desperated!
> I already read "Learning Perl" twice but I can't get into this stuff.
> As help I also bought "Programming Perl" and "The Perl Cookbook" but
> this language is still secret to me.
> I tried to program those examples to understand the syntax but maybe
> I'm to stupid for PERL.
> Maybe I give up.
> 
> Kind regards
> 
>        Thomas Klinger
>        Systemspecialist
> =======================================
> t.klinger@mobilkom.at
> http://www.mobilkom.at
> =======================================

Although those are all excellent and well regarded perl books, maybe
that is not the right approach for you. Perhaps you should try to jump
right in and start programming. Invent some cool reason to use perl and
go for it.:) Refer to the books when you get stuck, but keep your sights
on the cool program you're writing. You'll be done before you know it,
and (hopefully) much the wiser for the journey. Good Luck.



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

Date: 13 Jan 1999 05:15:24 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Newbie desperation
Message-Id: <77ha5c$md4@bgtnsc02.worldnet.att.net>

>I tried to program those examples to understand the syntax but
>maybe I'm to stupid for PERL.


No, you are smart to choose Perl. Obviously, with as much work
as you say you've attempted, something you are trying at a base
level is not working and causing the breakdown :). Now... if you
could post an example of what you are trying to do, and tell if
you are using a Unix or Windows machine, there are plenty of
folks who could help get you rolling.

CT





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

Date: Tue, 12 Jan 1999 21:15:52 -0500
From: Evan Panagiotopoulos <evanp@technologist.com>
Subject: Parsing the name from a form field name=Smith
Message-Id: <369C01D6.569540DA@technologist.com>

This is a multi-part message in MIME format.
--------------CE6B750099238C26E28441AC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

    Hello to all,  from a form I receive the POST containing the name
which was submitted.  How do I pick the actual name?
Thanks,


--------------CE6B750099238C26E28441AC
Content-Type: text/x-vcard; charset=us-ascii;
 name="evanp.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Evan Panagiotopoulos
Content-Disposition: attachment;
 filename="evanp.vcf"

begin:vcard 
n:Panagiotopoulos;Evan
tel;fax:(914) 457-4056
tel;home:Home Sweet Home
tel;work:Valley Central High School (914) 457-3122
x-mozilla-html:TRUE
org:Valley Central High School;Mathematics Department
adr:;;;;;;
version:2.1
email;internet:evanp@technologist.com
title:Computer Teacher
fn:Evan Panagiotopoulos
end:vcard

--------------CE6B750099238C26E28441AC--



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

Date: Tue, 12 Jan 1999 21:16:15 -0800
From: Troy Terry <tterry@pbi.net>
Subject: Re: Perl and LDAP
Message-Id: <369C2C1F.A8536FE8@pbi.net>

Brian Sullivan wrote:
> 
> I have been confused by all the LDAP modules for Perl that seem to be
> around.
> 
> What I would like is a Perl only module/code that  would allow me to do
> some simple monitoring of an LDAP server ( is it up, how many current
> entries). Does such a beast exist ? Most of what I have seen seems to
> require addition of a .dll in windows. I would like to avoid that and
> keep as portable as possible. Am I dreaming here?
> 

Isn't the LDAP API pretty much standard from system to system?  All
you'd
have to monkey with would be the part that loads the dll/library/
whatever.

But say you don't want to bother with that.

Aren't there a host of command-line utilities on ldap client machines
(your web server is or probably should be an ldap client) which do what
you want?  

>From perl you can say
@stuff = `/usr/bin/ldapsearch $all_sorts_of_crazy_args`;


Yours,
T. Terry


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

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

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