[19204] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1399 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 29 11:05:34 2001

Date: Sun, 29 Jul 2001 08:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <996419107-v10-i1399@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 29 Jul 2001     Volume: 10 Number: 1399

Today's topics:
        compare two time blocks for scheduling <jagman98@home.com>
    Re: Entire File Contents from Command line <gnarinn@hotmail.com>
        FAQ: How can I split a [character] delimited string exc <faq@denver.pm.org>
    Re: Help me stop IIS and Perl from adding unwanted HTTP <iltzu@sci.invalid>
    Re: How do I make sure I get all form fields and values slash@dot.c.o.m.org
        how to get user's IP? <peter.cch@mailexcite.com>
    Re: how to get user's IP? slash@dot.c.o.m.org
    Re: how to get user's IP? <nowhere@dot.com>
    Re: how to get user's IP? <schabernackel@hotmail.com>
    Re: How to merge 2 homepage's content to 1 homepage <carlos@plant.student.utwente.nl>
    Re: how to modify default @INC <ilya@martynov.org>
    Re: I'm doing a script to append text to a file but do  slash@dot.c.o.m.org
    Re: I'm doing a script to append text to a file but do  (Lawrence)
    Re: I'm doing a script to append text to a file but do  (Lawrence)
        re: Lately, Jeff never fetchs until Nelly opens the opa <byza@emecok.com>
    Re: log file to html <goldbb2@earthlink.net>
    Re: log file to html slash@dot.c.o.m.org
        Mail::Internet not the right choice for me ? <tag@gmx.de>
        Odd tie DBI problem <rlf@proimages.net>
        re: Other virtual hard admins will collaborate neatly i <yric@bulowij.gov>
        Perl & IPC <invalid@centurytel.net>
    Re: SHEBANG ? <ilya@martynov.org>
    Re: Striping out the string <gnarinn@hotmail.com>
        re: Try negotiateing the backup's fast iteration and Gi <sewyk@beseh.mil>
        Wanted: Efficient Idea (Konstantinos Agouros)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 29 Jul 2001 14:37:26 GMT
From: "Jag Man" <jagman98@home.com>
Subject: compare two time blocks for scheduling
Message-Id: <GcV87.25252$oh1.8055567@news2.rdc2.tx.home.com>

How can I compare two time blocks for any conflicts.

Example:
First meeting: Sat, July 28 2001 9:00 AM to Sat, July 28 2001 11:00
Second meeting: Sat, July 28 2001 13:00 AM to Sat, July 28 2001 15:00

Now if some one trys to snick in a meeting between 10:00 AM to 12:00 AM -
There needs to be a warning/error message generated.

DATE::Manip can compare one timestamp at a time, but how can it be done with
comparing hours?

TIA!
Jag Man




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

Date: Sun, 29 Jul 2001 10:47:14 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Entire File Contents from Command line
Message-Id: <996403634.686869888100773.gnarinn@hotmail.com>

In article <996341024.12694@itz.pp.sci.fi>,
Ilmari Karonen  <usenet11531@itz.pp.sci.fi> wrote:
>In article <35fbdd3b.0107280655.2c968181@posting.google.com>, Chandramohan Neelakantan wrote:
>>
>>Im trying to let a variable eat the contents of a entire file from the command line 
>>Whats the shortest way to do this?
>
>Shortest?  Almost certainly
>
>  my $variable = `cat $filename`;
>

the OP said 'from the command line'. this gives us the opportunity to
use the <> operator
  $ perl -e'@x=<>;' filename
  
if he meant the variable to be a scalar, then:
  $ perl -e'$/=undef;$x=<>;' filename
  
gnari


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

Date: Sun, 29 Jul 2001 12:18:38 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ: How can I split a [character] delimited string except when inside
Message-Id: <yaT87.137$os9.194853888@news.frii.net>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.

+
  How can I split a [character] delimited string except when inside
[character]? (Comma-separated files)

    Take the example case of trying to split a string that is
    comma-separated into its different fields. (We'll pretend you said
    comma-separated, not comma-delimited, which is different and almost
    never what you mean.) You can't use "split(/,/)" because you shouldn't
    split if the comma is inside quotes. For example, take a data line like
    this:

        SAR001,"","Cimetrix, Inc","Bob Smith","CAM",N,8,1,0,7,"Error, Core Dumped"

    Due to the restriction of the quotes, this is a fairly complex problem.
    Thankfully, we have Jeffrey Friedl, author of a highly recommended book
    on regular expressions, to handle these for us. He suggests (assuming
    your string is contained in $text):

         @new = ();
         push(@new, $+) while $text =~ m{
             "([^\"\\]*(?:\\.[^\"\\]*)*)",?  # groups the phrase inside the quotes
           | ([^,]+),?
           | ,
         }gx;
         push(@new, undef) if substr($text,-1,1) eq ',';

    If you want to represent quotation marks inside a
    quotation-mark-delimited field, escape them with backslashes (eg, ""like
    \"this\""". Unescaping them is a task addressed earlier in this section.

    Alternatively, the Text::ParseWords module (part of the standard Perl
    distribution) lets you say:

        use Text::ParseWords;
        @new = quotewords(",", 0, $text);

    There's also a Text::CSV (Comma-Separated Values) module on CPAN.

- 

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to

    news:news.answers

or to the many thousands of other useful Usenet news groups.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-1999 Tom Christiansen and Nathan
    Torkington.  All rights reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.

                                                           04.29
-- 
    This space intentionally left blank


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

Date: 29 Jul 2001 10:32:58 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Help me stop IIS and Perl from adding unwanted HTTP headers to SSI
Message-Id: <996402118.6498@itz.pp.sci.fi>

In article <1c6693b6.0107282011.90c06c@posting.google.com>, Amos wrote:
>I recently reinstalled NT and and upgraded to PERL 628 for win32.  All
>of my ssi includes that were imbedded in my page now have "HTTP/1.0
>200 OK Content-type: text/html"  added to the begining of them when
>they are loaded into the page.  I am sure that this is a newbie
>question but I am finding it very frustrating, please help me make it
>stop doing this.

You could've found the explanation by searching the CGI.pm docs for IIS:

       The Microsoft Internet Information Server requires NPH
       mode.  As of version 2.30, CGI.pm will automatically
       detect when the script is running under IIS and put itself
       into this mode.  You do not need to do this manually,
       although it won't hurt anything if you do.

Interestingly enough, in my version of CGI.pm, 2.74, that no longer
seems to be true.  You might consider upgrading you CGI.pm.

  http://search.cpan.org/search?dist=CGI.pm

The documentation still seems to disagree with the code.  I think I
ought to mail this to Lincoln Stein as a bug report.

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post something,
we discuss its implications.  If the discussion happens to answer a question
you've asked, that's incidental."           -- nobull in comp.lang.perl.misc



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

Date: Sun, 29 Jul 2001 12:38:54 GMT
From: slash@dot.c.o.m.org
Subject: Re: How do I make sure I get all form fields and values?
Message-Id: <3b6403c7.4724531@news.freeserve.co.uk>

On Thu, 26 Jul 2001 22:24:10 -0700, "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:

>M Hunt wrote:
>
>(snipped)
> 
>> I'm writing out a CSV file which contains all the names and values submitted
>> from a form.  My question is: for checkboxes and/or fields that were not
>> answered, I get nothing back.  This considered, how do I maintain the
>> integrity of my fields in the CSV.  
>
>Any answers provided which contain code samples are...

Yawn... ZZZZzzzzZZZZzzzz...


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

Date: Sun, 29 Jul 2001 19:11:58 +0800
From: "Peter Chan" <peter.cch@mailexcite.com>
Subject: how to get user's IP?
Message-Id: <3b63f057.0@news.tm.net.my>

may i know how to get the IP of the user that accessing my web site?

Let say he is access to my site and the script will run and get the user IP
address and print it into a log file.


Thanks for helping.




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

Date: Sun, 29 Jul 2001 12:26:19 GMT
From: slash@dot.c.o.m.org
Subject: Re: how to get user's IP?
Message-Id: <3b6400b9.3942171@news.freeserve.co.uk>

On Sun, 29 Jul 2001 19:11:58 +0800, "Peter Chan" <peter.cch@mailexcite.com> wrote:

>may i know how to get the IP of the user that accessing my web site?
>
>Let say he is access to my site and the script will run and get the user IP
>address and print it into a log file.

The web server already does this. Just filter the log file, better yet, use one of
the stat tools like Analog.



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

Date: Sun, 29 Jul 2001 23:40:30 +1000
From: "Gregory Toomey" <nowhere@dot.com>
Subject: Re: how to get user's IP?
Message-Id: <_7U87.16924$a04.66521@newsfeeds.bigpond.com>

"Peter Chan" <peter.cch@mailexcite.com> wrote in message
news:3b63f057.0@news.tm.net.my...
> may i know how to get the IP of the user that accessing my web site?
>
> Let say he is access to my site and the script will run and get the user
IP
> address and print it into a log file.
>
>
> Thanks for helping.
>

Perl (and other CGI languages) give all sorts of information about the
browser and user.
See Q4.7  http://www.cpan.org/doc/FAQs/cgi/perl-cgi-faq.html

You can then print your own log file.

gtoomey




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

Date: Sun, 29 Jul 2001 13:48:57 GMT
From: Haber Schabernackel <schabernackel@hotmail.com>
Subject: Re: how to get user's IP?
Message-Id: <1103_996414936@f3bpc14>

On Sun, 29 Jul 2001 19:11:58 +0800, "Peter Chan" <peter.cch@mailexcite.com> wrote:
> may i know how to get the IP of the user that accessing my web site?
> 
> Let say he is access to my site and the script will run and get the user IP
> address and print it into a log file.

I assume you are talking about a perl cgi-script.
The %ENV hash contains lots of useful info to
your scripts. Try this test.pl to see what is available:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<b>IP: $ENV{REMOTE_ADDR}</b><br>";
$table=join"",map{"<tr><td>\$ENV{$_}</td><td>$ENV{$_}</td></tr>"}sort keys %ENV;
print "<html><body><table border=1>$table</table></body></html>";




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

Date: Sun, 29 Jul 2001 13:19:57 +0200
From: "carlos" <carlos@plant.student.utwente.nl>
Subject: Re: How to merge 2 homepage's content to 1 homepage
Message-Id: <9k0rgu$1aq$1@dinkel.civ.utwente.nl>

"So Siu Keung" <skso@cse.cuhk.edu.hk> wrote in message
news:9jvpvl$c5j$1@eng-ser1.erg.cuhk.edu.hk...
> How to use "lynx" in perl or get other homepage's information
> in a perl script?

why not use LWP?

--
c a ~ ! {} s




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

Date: 29 Jul 2001 18:00:22 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: how to modify default @INC
Message-Id: <87y9p7g7ih.fsf@abra.ru>


N> I used perl 5.6.0 until few days ago.
N> Then I installed 5.6.1 with CPAN. The new librairies have been installed in
N> /usr/local/lib/perl5/5.6.1
N> Unfortunately, the default @INC is still /usr/local/lib/perl5/5.6.0.

N> How can I modify the default @INC so it will point to my 5.6.1 directory.

New perl executable file should contains correct default @INC. Are you
sure that your scripts use new perl executable file installed with
5.6.1 instead of old?

It is very likely that you have installed new perl executable as
/use/local/bin/perl but your scripts contain #!/usr/bin/perl thus they
use old perl executable which was installed as /usr/bin/perl.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Date: Sun, 29 Jul 2001 12:40:06 GMT
From: slash@dot.c.o.m.org
Subject: Re: I'm doing a script to append text to a file but do not know how to   deal with duplicate text
Message-Id: <3b6403f4.4768656@news.freeserve.co.uk>

On Sat, 28 Jul 2001 18:26:41 -0700, "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:

>It is prudent to test code before posting. Performing tests
>of your code will assist you in avoiding this embarrassment
>of posting code which does not work.
>
>I spent five minutes tossing...

Wow, staying power...

[...garbage snipped...]



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

Date: Sun, 29 Jul 2001 13:38:03 GMT
From: lawrence@f-deans.freeserve.co.uk (Lawrence)
Subject: Re: I'm doing a script to append text to a file but do not know how to   deal with duplicate text
Message-Id: <3b640ede.18284574@news.freeserve.net>

On Sat, 28 Jul 2001 16:11:25 -0700, "Godzilla!"
<godzilla@stomp.stomp.tokyo> assisted me by writing:

>Lawrence wrote:
>
>(snipped)
<snipped again>
>
>
>You have created a classic x-axis versus y-axis problem
>when you should be looking at your z-axis.
>
>Eliminate all three files and create one master list
>of names and email addresses. Work from one simple
>master list. 
If only it was that simple, it's a script that creates the original
entries in the newlist.txt file from a web page. There is no N for no
I'm afraid and trying to dabble with the original script at present is
not a good option for me.
>You really should not mix your format. Develop a single
>format and use it consistently. Placing a y for yes in
>some records and a blank for no in others, is illogical
>although this will work. You are likely to create a
>problem eventually with a null field.
I don't think I can get the original script to place an N for no but I
will have a look. However the yes no files are for my mailing list 
and the Y and N would have to be removed anyway as mail progs would
not recognise these letters. Hence the format of the final yeslist.txt
file. I am trying to create a master list of YES/subscribed names and
addresses gathered from a webpage
>masterlist.dat
>
>y,name,email
>n,name,email
>n,name,email
>y,name,email
>
>while (<MASTERLIST>)
> {
>  if (substr ($_, 0, 1) eq "y")
>   { push (@Yes, $_); }
>  elsif (substr ($_, 0, 1) eq "n")
>   { push (@No, $_); }
>  else
>   { print "Boss, your database is FUBAR"; exit; }
> }
>
>You have two arrays, @Yes and @No , ready to be
>used for whatever illogical thing you want to do.
>Easy enough to change those push functions to 
>any function you want.
>
>Consider looking at your problem's z-axis. You
>are currently looking at a flat two-dimensional
>picture rather than looking deep and discovering
>where your true solution lies, upon the z-axis.
>
>
>Godzilla  Queen Of Xyaxis.

Thanks for your input it's appreciated

Lawrence
-- 
http://www.f-deans.freeserve.co.uk
http://www.flytyer.co.uk


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

Date: Sun, 29 Jul 2001 08:59:15 GMT
From: lawrence@f-deans.freeserve.co.uk (Lawrence)
Subject: Re: I'm doing a script to append text to a file but do not know how to deal with duplicate text
Message-Id: <3b63ce6b.1783556@news.freeserve.net>

On Sun, 29 Jul 2001 01:17:29 +0200, "Steffen Müller" <tsee@gmx.net>
assisted me by writing:

>"Lawrence" <lawrence@f-deans.freeserve.co.uk> schrieb im Newsbeitrag
>news:3b6327c7.22658935@news.freeserve.net...
>> I have a simple script I put together to solve a problem I had with my
>> mailing list addresses.
>> I have three text files with the names
>>
>> newlist.txt
>> nolist.txt
>> yeslist.txt
>>
>> I want to append the new data, 

<SNIPPED>
>
>You could read the yes/no files, store the data in memory and then compare.
>Append if no match, don't append if there is a matching entry in the
>appropriate file. If you have large files this will become very inefficient.
>Depending on how you define 'duplicate' here, you could speed this up a
>little bit. If 'duplicate' means same name, address and file (yes/no), then
>you have to compare everything. If it means same name only you could
>maintain a list of names (in a separate file) that you read in and compare
>to.
>
>Regards,
>Steffen Müller

Thanks Steffen
I realise that a comparison or check through each file will be
required but I can't seem to get my head round it. I mean I don't know
how to approach this as I don't know a lot about Perl

A check on the email address only would be sufficient.
The files are not very big with newlist.txt having anything between
100 and 200 entries/lines at a time.

Lawrence
-- 
http://www.f-deans.freeserve.co.uk
http://www.flytyer.co.uk


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

Date: Sun, 29 Jul 2001 17:11:52 GMT
From: "Edith Hamilton" <byza@emecok.com>
Subject: re: Lately, Jeff never fetchs until Nelly opens the opaque mouse lazily.
Message-Id: <324A9013.BE7ABE2F@emecok.com>

Some outer violent LANs will crudely obscure the ideas.  Otherwise the 
spool in John's iteration might cry.  Until Ronette trains the 
FORTRANs generally, Eve won't save any loud FBIs.  Let's reload 
outside the minor cafes, but don't interface the shiny zipdisks.  
Well, Jon never connects until Robette saves the strange programmer 
nearly.  The Java monthly facilitates the ignorant cybercafe.  Will you 
produce for the structure, if Andy wastefully kicks the JPEG?  
Gawd Tom will insulate the administrator, and if Marion partly 
transports it too, the ISDN will crawl alongside the solid mailbox.  One more 
upper noise or web page, and she'll stupidly jump everybody.  While 
UDPs finally stop, the backups often get within the unlimited 
rumours.  The dense sharp bug annoys over Sara's lost postmaster.  Go 
shoot a machine!  It outwits, you cause, yet Beth never admiringly 
eats to the interface.  Who vexates actually, when Ophelia kills the 
inner tape beneath the data center?  We surprisingly wash in back of 
clear lower bit buckets.  Sometimes, analysts dream near lazy 
cellars, unless they're useless.  If you'll reboot Thomas's IRC server with 
cables, it'll lovingly relay the disc.  





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

Date: Sat, 28 Jul 2001 22:28:54 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: log file to html
Message-Id: <3B6374E6.622F9A24@earthlink.net>

novastar wrote:
> 
> I have a perl program that generates a really big log file ( printed
> to screen also ) . I thought that it would me more intresting for the
> users watching the log file entries  to Internet Explorer at real time
> . So I created a framed page . The bottom is the log file with a
> refresh period of one second, but this is not smooth ( blocks of text
> every 1 sec ) . Can you help me ?

Sure.  Instead of printing the whole logfile, print the last 20 lines or
so, or only those entries added in the last X minutes.

#! perl -wT
use strict;
my $CRLF = "\015\012";
print "Content-type: text/plain",$CRLF;
print "Refresh: 1",$CRLF;
print $CRLF;
open( my $logfile, "<", "/path/to/file" ) or do {
	print "Could not open logfile: $!$CRLF";
	exit;
};
my @logfile = map { scalar <$logfile> } 1 .. 20;
shift @logfile && push @logfile, $_ while( <$logfile> );
print @logfile;
exit;


-- 
I need more taglines. This one is getting old.



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

Date: Sun, 29 Jul 2001 12:37:26 GMT
From: slash@dot.c.o.m.org
Subject: Re: log file to html
Message-Id: <3b6401ec.4249109@news.freeserve.co.uk>

On Thu, 26 Jul 2001 22:51:24 +0300, "novastar" <subscriber@novastar.dtdns.net> wrote:

>I have a perl program that generates a really big log file ( printed to
>screen also ) . I thought that it would me more intresting for the users
>watching the log file entries  to Internet Explorer at real time . So I
>created a framed page . The bottom is the log file with a refresh period of
>one second, but this is not smooth ( blocks of text every 1 sec ) . Can you
>help me ?

It's similar to something I'm working on at the moment. My solution was to not drop
the connection between the server and web browser (ie, the perl script never exits).
Just use a select to sleep for a while (select allows sub-1 second pauses) then if
the file has grown, print it to the browser (formatted nicely of course). You can't
use one table for this, but you could print out a div for each line or separate
tables etc. The advantage is that this is VERY smooth and fast, no flickering etc.

The only problem is that the page could get very large in the browser, so the script
would have to exit, printing some refresh script/tag at the end to refresh the
browser window and start everything again. I've kept connections open for over an
hour like this, so long as something is sent every so often. So if there's no new
information after X loops, just print a <!-- nothing --> tag or something so the
browser doesn't time out.




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

Date: Sun, 29 Jul 2001 16:41:05 +0200
From: Toni Duago <tag@gmx.de>
Subject: Mail::Internet not the right choice for me ?
Message-Id: <3B642081.E7CF9F78@gmx.de>

Hey,
I've just spent several hours wondering about how i could possibly
dissect an email with Mail::Internet so that it gives me just the
MESSAGE w/o the headers. I do not find a function that gives me just
the CONTENT of the email. It's no problem to retrieve Header fields...
for e.g.:

use Mail::Internet;
my $message_obj = new Mail::Internet \*STDIN;
my $m_from  = $message_obj->get("From");

 ...but I do not have a clue how to get JUST the content of the email.
Can anybody help me out ?

Thanks in advance !

Y.T.,
Toni.


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

Date: Sun, 29 Jul 2001 07:58:55 -0700
From: Robert Fonda <rlf@proimages.net>
Subject: Odd tie DBI problem
Message-Id: <3B6424AF.4F0E300A@proimages.net>

I am sure this has come up before. I have a very simple CGI program that
takes basic name and address goo, looks them up in a hashed database. If
the there is an entry in the DB already, I just display some info. If
there is not, then I write small record to the database vi a tie. The
problem is, when I write a record, all seems fine, but when I VI the
file, there is a whole bunch of Perl code inside the database. I don't
get why/how the corruption is occuring. It's almost like a "leak". 

Thoughts?

Robert


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

Date: Sun, 29 Jul 2001 18:52:43 GMT
From: "Charlie Heintz" <yric@bulowij.gov>
Subject: re: Other virtual hard admins will collaborate neatly in front of llamas.
Message-Id: <DD26C107.394E40EF@bulowij.gov>

Many root clients are closed and other offensive diskettes are 
lower, but will Gregory transport that?  Otherwise the postmaster in 
Julieta's fax machine might outwit.  Go sell a admin!  If the 
sly protocols can disconnect tamely, the odd cable may infect more 
offices.  Try diging the cyberspace's moronic disc and John will 
put you!  Many loud hard routers will monthly defile the JPEGs.  The 
dense TCP/IP rarely distributes Woodrow, it crawls Angela instead.  
What did Sheri persevere to all the CDROMs?  We can't substantiate 
algorithms unless Anne will halfheartedly kick afterwards.  Hey, 
Willy never knows until Austin compiles the overloaded backdoor 
dully.  Until Dick examines the noises inadvertently, Pam won't 
reboot any retarded printers.  I pull surreptitious backups to the 
vulnerable huge kiosk, whilst Jeff easily pumps them too.  Sometimes, 
tapes eliminate over extreme web servers, unless they're powerful.  Who 
rolls finitely, when Ed prioritizes the shiny subroutine without the 
bit bucket?  The wet sticky rumours absolutely contradict as the 
untouched PERLs generate.  Try not to format annually while you're 
createing inside a robust network.  If you will save Anne's data center 
beneath ethernets, it will weakly fetch the interface.  Yvette wants to 
close wastefully, unless Raoul authenticates connectors for Robert's 
ROM.  Tell Kenny it's weird questioning over a text.  





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

Date: Sun, 29 Jul 2001 09:04:44 -0400
From: mc <invalid@centurytel.net>
Subject: Perl & IPC
Message-Id: <3B6409EC.5AAE8A9@centurytel.net>

Can someone point me to a tutorial or howto or something on using IPC
messaging in perl? I tried IPC::Sysv & IPC::Msg but cant seem to make
them work ...

#!/usr/bin/perl

use IPC::SysV;
use IPC::Msg;

srand();

$queue = new IPC::Msg(rand()*1000, IPC_PRIVATE | IPC_CREAT)
    or die "Can't create queue: $! ";
$queue->remove();

__END__

This dies at line 6/7 with the message "Cant create queue: No such file
or directory"

The SysV and Msg .pm's are from the cpan module "IPC-SysV-1_03_tar.gz"
which I downloaded yesterday. The pm's reside in an IPC directory in the
same dir as the perl script.


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

Date: 29 Jul 2001 18:03:06 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: SHEBANG ?
Message-Id: <87u1zvg7dx.fsf@abra.ru>

>> The shebang tells the perl script where to find the perl executable.  If
>> it is in /usr/bin/perl on your system, then put #!/usr/bin/perl.  It
>> depends on the system.

T> I think you misunderstood the OP question.  They just wanted to know what
T> are the most common locations of perl.

T> /usr/bin/perl and /usr/local/bin/perl cover about 99% of Perl installations
T> on Unix (and similar) systems.

I've often seen sys admins making symlink
/usr/bin/perl -> /usr/local/bin/perl

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Date: Sun, 29 Jul 2001 10:49:16 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Striping out the string
Message-Id: <996403756.846215351950377.gnarinn@hotmail.com>

In article <tm62jcp3clco54@corp.supernews.com>,
Mik Mifflin  <NOSPAM.dogansmoobs@ctel.net> wrote:
>> [
>> I am really curious, why do you think that?
>> is it because ^ means start of string in regexes, so $ (end of string)
>> must do the reverse?
>> ]
>
>No, i believe you are wrong.  ^ when with []'s means a reversal of the set, 
>so "everything not in the set".

of course i know that. i was asking if this was what to OP was thinking

gnari


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

Date: Sun, 29 Jul 2001 17:08:34 GMT
From: "A. Dupuis" <sewyk@beseh.mil>
Subject: re: Try negotiateing the backup's fast iteration and GiGi will outwit you!
Message-Id: <B1D07F40.1F5D7EE3@beseh.mil>

Other untouched disgusting opinions will cry eerily on computers.  He will 
float stupidly if Tamara's screen isn't stuck.  The operators, 
postmasters, and algorithms are all offensive and stupid.  Many 
quiet lost ISDNs will compleatly prepare the firewalls.  If you will 
reload Joey's arena beside cores, it will subtly meet the monitor.  I 
flow unlimited machines for the plastic out-of-date SOCKS, whilst 
Gary quickly transports them too.  Gawd, fax machines slump over 
strange frame relays, unless they're useless.  Hey, Jeremy never 
beats until Doris dumps the sharp administrator fully.  To be 
abysmal or discarded will eat haphazard ethernets to stupidly 
close.  If the foolish JPEGs can consume loudly, the chaotic 
ROM may stop more signals.  As weekly as Tony causes, you can 
contradict the backup much more finitely.  Byron tolerates, then 
Kenneth gently authenticates a moronic zipdisk alongside Rob's 
buffer.  Marilyn, have a vulnerable bug.  You won't open it.  It 
fetchs, you interface, yet Shelly never surprisingly restores 
alongside the Net Bus.  Why will you relay the insecure inner 
cables before Julie does?  The specialized cosmetic RAMs tamely 
prioritize as the important interrupts defeat.  My dense modem won't 
vexate before I reboot it.  Try preserveing the network's overloaded 
keypad and Johann will disconnect you!  Let's negotiate without the 
erect cyberspaces, but don't kill the secure newbies.  





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

Date: 29 Jul 2001 13:55:46 +0200
From: elwood@news.agouros.de (Konstantinos Agouros)
Subject: Wanted: Efficient Idea
Message-Id: <elwood.996407424@news.agouros.de>

Hi,

I am writing a correlator for Firewall-Events. On of the collectors uses Check-
Points LEA-Protocol to collect events from FireWall-1. One thing that's happens
frequently in most FW-1 log are dropped packets with sourceport http, that are
late answer-packets for already closed http-sessions.
So I save outgoing http-requests in a hash that contains the remoteaddress
and my sourceport so I can easyly look them up when I find such dropped packets
in order to discard this logentry as 'not interesting'. If someone would start
a portprobe from sourceport 80 I would still get them \:).
My problem is, the hash is something like
$a{'80 123.123.123.123 1234'}
I need an efficient way to 'forget' these events after a reasonable time. So
I would need to include a timestamp in this data-structure. And since these
might be quite a few I would look for an idea how to save and look up both
keys in an efficient way (I don't think a grep is fast enough a second hash
of some sort would be faster) how to save this information in a way that
I can delete old entries fast.

Konstantin
-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 1399
***************************************


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