[12182] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5782 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 25 22:07:23 1999

Date: Tue, 25 May 99 19:00:17 -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           Tue, 25 May 1999     Volume: 8 Number: 5782

Today's topics:
        can't write to text-file from web form <bhaskart@my-dejanews.com>
    Re: can't write to text-file from web form <gregm@well.com>
        DBM File will not open after Redhat 6.0 upgrade <bruce@flair.law.ubc.ca>
    Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (J. Moreno)
    Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <tchrist@mox.perl.com>
    Re: form2mail include page data <mcdonnel_toss_ @ _remove_bestweb.{3 letter abbrev. for network}>
    Re: Help experts!!!: SEMAPHORE question <thecure@us.ibm.com>
    Re: Help with replacing of text (Code included)... (Bob Trieger)
    Re: Help with replacing of text (Code included)... (Tad McClellan)
        how to know which child died? (GEMINI)
        newbi: UNIX to NT <customk9@home.com>
    Re: Newbie needs help with search! (Larry Rosler)
    Re: Open a textfile with a cgi-programm (Larry Rosler)
    Re: Perl "constructors" zenin@bawdycaste.org
    Re: Perl compiler...If or when <corus@my-dejanews.com>
    Re: Perl, GUI and VAX VMS <sugalskd@netserve.ous.edu>
        RE: Programming Web Graphics with Perl and GNU Software <jeremy@microlink.net>
        RDF parser for My Netscape type RDF <otis@my-dejanews.com>
    Re: s/// multiple lines in file from cmd line (Charles DeRykus)
    Re: Sorting Problem (Larry Rosler)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 26 May 1999 00:18:31 GMT
From: Bhaskar Thiagarajan <bhaskart@my-dejanews.com>
Subject: can't write to text-file from web form
Message-Id: <7ifekl$o6h$1@nnrp1.deja.com>

Hi

I'm trying to implement a feedback form using Perl running on Win NT
that has a PWS running on it. For starters, I'm trying to just save the
form results in a text file.

I'm unable to get that to work...I get a 'no such file or directory'
error.
I used absolute path names ( C:\InetPub\wwwroot\cgi-bin)
I checked permissions...all users are allowed to read/write. in all the
directories in that tree.

I know that Perl gets invoked because other parts of the script work...I
can see that it is able to grab the data from the form...except that it
can't seem to open a file and write to it.

To make things real simple...I changed my script to just open a file and
write 'hello world' and close it...wouldn't work from the browser but no
problems from the command line.

I'm out of ideas on how to debug this...hope someone can help me out
here.

Cheers
Bhaskar


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: Tue, 25 May 1999 17:48:56 -0700
From: Greg McCann <gregm@well.com>
Subject: Re: can't write to text-file from web form
Message-Id: <374B44F8.33367192@well.com>

Bhaskar Thiagarajan wrote:
[snip]
> To make things real simple...I changed my script to just open a file and
> write 'hello world' and close it...wouldn't work from the browser but no
> problems from the command line.
[snip]

I and others could guess at your problem, but posting your test script (not from
memory - copy and paste) will guarantee more accurate answers.

Greg

-- 

======================
Gregory McCann
http://www.calypteanna.com

"Be kind, for everyone you meet is fighting a great battle."  Saint Philo of
Alexandria


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

Date: Tue, 25 May 1999 18:48:44 -0700
From: Bruce Atherton <bruce@flair.law.ubc.ca>
Subject: DBM File will not open after Redhat 6.0 upgrade
Message-Id: <374B52FC.6FCC44B0@flair.law.ubc.ca>

I've been using a PERL script to maintain a database that uses
dbmopen(). Since I upgraded to Redhat 6.0, it will not work with my
database anymore.

I suspect that there is a different version of DBM being used, since the
file containing the database was created as "database.db" by the script,
and now the same script makes it just "database" with no extension. As a
result, the database appears to be empty.

If I copy the old "database.db" over to "database", the dbmopen() call
fails.

Apologies if this is a FAQ (an hour's searching found nothing) but could
someone point me at how to get the script working again? Thanks for any
help.


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

Date: Tue, 25 May 1999 20:59:28 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <1dsdnz1.7lseqd7oluoqN@roxboro0-0060.dyn.interpath.net>

Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:

> hymie! <hymie@lactose.smart.net> wrote:
> 
> > I found a quote once ... 
> > 
> > It's not Perl's fault if you don't know how to program.
> >                                      --Ronald J Kimball
> > 
> > ... and kept it in my set of random sigs.
> 
> Ironically, I originally wrote that in a discussion about, what else,
> localtime() returning the year as an offset from 1900.
> 
> Old threads never die...  They just resurface a month later with a new
> subject line.

Fortunately this particular thread should die out in a little over 6
months.  Everybody will see what localtime returns, and a different
thread will start up "Will the way localtime returns the year change
soon?".

-- 
John Moreno


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

Date: 25 May 1999 19:11:27 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <374b4a3f@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, planb@newsreaders.com (J. Moreno) writes:

Interesting domain, that.

:Fortunately this particular thread should die out in a little over 6
:months.  Everybody will see what localtime returns, and a different
:thread will start up "Will the way localtime returns the year change
:soon?".

I for one can hardly wait for that blessed day: 0/1/100. :-)

--tom
-- 
    Choose a job you love, and
    you'll never have to work
    a day in your life.


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

Date: Wed, 26 May 1999 01:28:24 GMT
From: "John McDonnell" <mcdonnel_toss_ @ _remove_bestweb.{3 letter abbrev. for network}>
Subject: Re: form2mail include page data
Message-Id: <Y6I23.1292$fB1.100029@newshog.newsread.com>

Unless I'm missing something, you don't have any FORM tags on the page! You
need to add them, along with some INPUT tags to specify the data you want
the mail recipients to receive.

You shouldn't need Perl at all for this task.

>From the HTML 4 spec
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13  :
    The next example shows how to send a submitted form to an email address:

     <FORM action="mailto:Kligor.T@gee.whiz.com" method="post">
     ...form contents...
     </FORM>

I would take a look at the HTML4 spec and I'd bet you can find what you need
in there.

John

Les Mower wrote in message ...
>I am a sorcerer's assistant when it comes to perl. I have a problem where I
>need to modify a webpage that currently would include the following code
>sample
>
><table BORDER="2" CELLPADDING="10" COLS="1" WIDTH="75%" BGCOLOR="#FFFFFF">
>  <tr>
>    <td><b><font COLOR="#3366FF">Vistana Resort </font><font
>COLOR="#000000">$6200.00 </font><font
>    COLOR="#FF0000">Original Price $12,800.00&nbsp;</font></b> <br>
>    <a HREF="mailto:mailreciepient@aol.com"><img SRC="em8.gif" BORDER="0"
>HEIGHT="50" WIDTH="50"></a>

<snip>




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

Date: Tue, 25 May 1999 20:38:24 -0400
From: "thecure@us.ibm.com" <thecure@us.ibm.com>
Subject: Re: Help experts!!!: SEMAPHORE question
Message-Id: <374B4280.96E6F33C@us.ibm.com>

Here is the code... I explain in the separator what my problem is... I just
need the correct "$semop" values... I just want the WRITING process to be
able to write anytime except for the tenth of the second the READING process
will need to access the variable... My problem is that it only writes after
there is a read... THANK YOU!!!


===> Here is the code for the process that WRITES the memory...


  $PERM=0666;
  $ipckey=11;
  $size=1024;

  $semid=semget($ipckey, 1, &IPC_CREAT | $PERM);
  $semnum=0;
  $semflags=0;

  $msgid=shmget($ipckey, $size, &IPC_CREAT | $PERM);

  $j=1;
  while ($j>0) {
    $message="Test " . $j;
    $j++;
    $semop=-1;
    $semopstr=pack("sss",$semnum,$semop,$semflags);
    die "W Cannot get semaphore" unless semop($semid,$semopstr);

    shmwrite($msgid, $message, 0, 80);
    print "Write $j: $message \n";

    $semop=-1;
    $semopstr=pack("sss",$semnum,$semop,$semflags);
    die "W Cannot get semaphore" unless semop($semid,$semopstr);
    sleep $wait;
 }


===> Here is the code for the process that reads the memory
===> My problem is that the above process can only write only after there
was a read...
===> I want it to be able to write ANYTIME other than the instant that this
one is doing a read

  $PERM=0666;
  $ipckey=11;
  $size=1024;

  $semid=semget($ipckey, 1, &IPC_CREAT | $PERM);
  $semnum=0;
  $semflags=0;

  print "Trace1\n";
  $semop=0;
  $semopstr=pack("sss",$semnum,$semop,$semflags);
  die "W Cannot get semaphore" unless semop($semid,$semopstr);

  print "Trace2\n";
  $msgid=shmget($ipckey, $size, &IPC_CREAT | $PERM);
  $retval=shmread($msgid, $message, 0, 80);
  print "Read: $message ret= $retval \n";

  print "Trace3\n";
  $semop=2;
  $semopstr=pack("sss",$semnum,$semop,$semflags);
  die "W Cannot get semaphore" unless semop($semid,$semopstr);
  print "Trace4\n";



John Porter wrote:

> In article <374AEE15.7E94EC19@juno.com>,
>   Bouty_Bouty@juno.com wrote:
> > What is the correct combination for the semaphore option?:
> > One process constantly runs and writes shared memory. It needs to lock
> > the semaphore and then release it. It should always be able to control
> > the semaphore state.
> > The second process only reads and can only do so when the semaphore is
> > not locked.
> >
> > No need to specify the whole command, just the semaphore option before
> > and after will do... Thanks!!!
>
> Please post the code you have so far, and point to the spot where
> you're having problems.  JUST the code illustrating your problem
> will be sufficient, not the whole bloody program.  Thanks.
>
> --
> John Porter
> Put it on a plate, son.  You'll enjoy it more.
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---



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

Date: Wed, 26 May 1999 00:19:47 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Help with replacing of text (Code included)...
Message-Id: <7ifd4v$if6$1@ash.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
Mitch <portboy@home.com> wrote:
>I'm trying to very simply search through a config file e.g.
>
>foo 1234
>bar 5678
>etc....
>
>and find the "bar" line.  That works fine.  Now I've written a
>subroutine that should replace the "bar" line with another line.  All
>that seems to be happening is that it removes the line from the file.
>
>I've pasted in my code so you can show me the error of my ways,
>
>Mitch
>
>
>
>Here's the code used to replace a line....
>
>sub switch {
>        my($old,$new,$file) = @_;
>
>        system("chmod +w $file");

why?
perldoc -f chmod

>        open(OUT,">$file.bak") || &show("Can't open $file!");
>        open(FILE,"$file") || &show("Can't open $file!");
>
>        while(<FILE>)
>        {
>                next if (/$old/);
>                if (/$old/)

This is kinda funny. This will never be executed. You told it in the 
previous line to go to the next line of <FILE> if $old is matched.

>                {
>                        if ($_ eq "$new\n")
>                        {
>                                print OUT;
>                        }
>                        else
>                        {
>                                print OUT "$new\n";
>                        }
>                        next;
>                }
>                print OUT;
>        }
>
>        close(FILE);
>        close(OUT);
>        system("/bin/mv $file.bak $file");

why?
perldoc -f unlink
perldoc -f rename
perldoc File::Copy

>}

HTH



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

Date: Tue, 25 May 1999 16:31:28 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with replacing of text (Code included)...
Message-Id: <0b1fi7.93l.ln@magna.metronet.com>

Mitch (portboy@home.com) wrote:

: and find the "bar" line.  That works fine.  Now I've written a
: subroutine that should replace the "bar" line with another line.  All
: that seems to be happening is that it removes the line from the file.

: I've pasted in my code so you can show me the error of my ways,


: sub switch {
:         my($old,$new,$file) = @_;

:         system("chmod +w $file");


   That might fail.

   It will fail silently the way you have it.

   That is Not Good.

      system("chmod +w $file") && die "problem running system()";


:         open(OUT,">$file.bak") || &show("Can't open $file!");
:         open(FILE,"$file") || &show("Can't open $file!");
                    ^     ^
                    ^     ^
   Those double quotes serve no purpose there.


:         while(<FILE>)
:         {
:                 next if (/$old/);
:                 if (/$old/)
:                 {

   Q: When will execution reach here?

   A: Never, because if it does match /$old/, you go back to the 
      top of the loop via the next()...


   Maybe you want         next unless /$old/;      instead?


:                         if ($_ eq "$new\n")
:                         {
:                                 print OUT;
:                         }
:                         else
:                         {
:                                 print OUT "$new\n";
:                         }
:                         next;
:                 }
:                 print OUT;
:         }

:         close(FILE);
:         close(OUT);
:         system("/bin/mv $file.bak $file");


   You should check the return value here too.


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


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

Date: 26 May 1999 01:47:19 GMT
From: dennis@info4.csie.nctu.edu.tw (GEMINI)
Subject: how to know which child died?
Message-Id: <7ifjr7$phf$1@netnews.csie.NCTU.edu.tw>

I use fork to spawn some children processes.
When a child died, I need to do different actions
according to which child died. By catching the 
signal, I can be notified when any child died,
but cannot distinguish among them (e.g., knowing the PID). 
So is there any easy way to do that?
thanks.



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

Date: Wed, 26 May 1999 01:36:56 GMT
From: "Don Stefani" <customk9@home.com>
Subject: newbi: UNIX to NT
Message-Id: <YeI23.252$u03.490@news.rdc1.sfba.home.com>

hello!
I am brand new to programming and am trying to learn the basics so I can be
a better webpage designer.
I have active perl on my windows machine, and all the study books and
scripts I can get from the web are for UNIX. May I ask you please, how do I
make a UNIX perl / CGI program NT ready?

Can someone send to the right referal pages?


Thank you, thank you very much.

Don (my eyeballs are burnin') Stefani


 ....."I dig all the free knowledge on the web, thanks"






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

Date: Tue, 25 May 1999 18:19:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Newbie needs help with search!
Message-Id: <MPG.11b4ebe176ca758f989af9@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <lniei7.5pk.ln@magna.metronet.com> on Tue, 25 May 1999 
12:22:13 -0400, Tad McClellan <tadmc@metronet.com> says...
 ...
>    if (defined $another_line = <>) {  # see if there is another line

Can't modify defined operator in scalar assignment ...

     if (defined($another_line = <>)) {  # see if there is another line

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


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

Date: Tue, 25 May 1999 18:13:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Open a textfile with a cgi-programm
Message-Id: <MPG.11b4eab0ad7f5dd1989af8@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <374B2B24.83B4B2B0@atrieva.com> on Tue, 25 May 1999 15:58:44 
-0700, Jerome O'Neil <jeromeo@atrieva.com> says...
> Larry Rosler wrote:
> > -0700, Jerome O'Neil <jeromeo@atrieva.com> says...
> > + You can rest assured that my concept of the current working directory
> > + and my web server's concept of the current working directory are one
> > + and the same.
> > 
> > It was addressed to the original poster.  But I wish you would explain
> > how you are assured that the current directory is what you think it is,
> > without having set it to be that?
> 
> Because I take pains to ensure my servers behave in a predictable
> manner, and I understand the behavior and environment of the software
> that they run.  
> 
> How do you do it?

I run my code on a multiplicity of servers on both HP-UX and Windows NT.  
The servers (and, for that matter, the perl compilers) are maintained by 
webmasters over whom I have little or no control.  I understand the 
behavior and environment of the software that they run, but I cannot 
ensure that everything behaves in the same predictable manner.  Sigh...

I keep absolute directory pathnames (and other installation-dependent 
parameters) in a configuration file, as Perl assignments to global 
variables.  The configuration file is created in the same directory as 
the rest of the CGI program, by a portable Perl installation program.  
The nonportable pathnames are parameters to that program or are figured 
out directly by it.

On every CGI invocation, the program finds the configuration file in its 
own directory by analyzing the $0 variable:

BEGIN {
    require 5.002; # Because that's the most that I can rely on!!!
    $0 =~ m!(.*?)[^/\\]+$! && $1 and unshift @INC, $1;
    do 'config' or # The actual code also sends me email!
        print("Content-type: text/plain\n\nconfig failed. $!.\n"), exit;
}

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


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

Date: 26 May 1999 00:55:42 GMT
From: zenin@bawdycaste.org
Subject: Re: Perl "constructors"
Message-Id: <927680311.575832@localhost>

Gareth Rees <garethr@cre.canon.co.uk> wrote:
: zenin@bawdycaste.org wrote:
:> Perl's model blends the lines between "exceptions" and traditional
:> error reporting (set a global ala $@ and return false).  Perl gives
:> you the flexibility to move back and forth between these and other
:> systems nearly transparently, without any loss of functionality for
:> either paradigm.
: 
: Except that some other module that you're using might have installed a
: $SIG{__DIE__} handler that messes with your exception object. This is
: where the transparency breaks down.

	A __DIE__ handler will always die(), unless it exit()s (in which
	case you simply throw out the code that did that and promptly fire
	the person that wrote it).

: The other module's interpretation of 'die' as 'exit' clashes with your use
: of 'die' as 'throw'.

	99.9% of the time, anyone setting __DIE__ to sub { exit } should be
	fired, outright.

	In practice, this is not a problem.  If you are really worried about
	it, then simply do:

		eval { local $SIG{__DIE__} = 'DEFAULT';
		    hostle_code_here();
	        };

-- 
-Zenin (zenin@archive.rhps.org)         Caffeine...for the mind.
                                        Pizza......for the body.
                                        Sushi......for the soul.
                                             -- User Friendly


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

Date: Wed, 26 May 1999 01:39:22 GMT
From: Corus <corus@my-dejanews.com>
Subject: Re: Perl compiler...If or when
Message-Id: <7ifjca$rf7$1@nnrp1.deja.com>

Is this newsreader of acceptable quality? I see my postings offend.

In article <MPG.11b4d360609f8a2a989af5@nntp.hpl.hp.com>,
  lr@hpl.hp.com (Larry Rosler) wrote:
> [Posted and a courtesy copy mailed.]
>
> In article <7if5jc$hc2$1@nnrp1.deja.com> on Tue, 25 May 1999 21:44:13
> GMT, Corus <corus@my-dejanews.com> says...
> ...
> > Unix wouldn't exist without the greed of AT&T.
>
> I'll step in on that one, which is diametrically opposite to the
truth.

And I sincerely thank you for doing so for two reasons:

One, is for setting the record straight while democratically giving me
the opportunity to acknowledge it.
I for one, and I wish others would follow my example, would hate to go
down in newsgroup history as one that capitalises on other peoples
ignorance.

Two, is that what you're pointing out is in fact proof that those
"savage giants", as some people choose to  portrait them, have in fact
helped *us* more that *we* would like to admit. They've given *us*
access to their funds and technology and helped advance science further.
(Not always out of the goodness of their hearts but the end result
remains unaltered)

> Please try to keep your presentations of history closer to reality.
I do my best but I'm only human.

regards...


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 26 May 1999 01:55:03 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: Perl, GUI and VAX VMS
Message-Id: <7ifk9n$2tv$1@news.NERO.NET>

msutfin@my-dejanews.com wrote:
: Can I use PERL for GUI development from Open VMS 3GL programs? I'd like
: to execute PERL to display GUI's from VAX BASIC,C and send and receive
: data to and from the GUI forms and the 3GL programs.  Any input to this
: will be much helpful.

Umm.... Those statements don't make all that much sense when taken
together. Are you looking to have perl on the Vax do GUI directly? If so,
you're sort of out of luck, as Tk doesn't (quite) work on VMS yet.

Are you trying to run perl on a PC and connect to programs on a Vax via
telnet or something, suck the data down, and display graphics? Sure,
that's doable--snag Tk for your PC and look at Net::Telnet.

Do you have GUI programs (presumably X-emabled) on the Vax and want to
control them via perl on the Vax? You can do that too, but it's probably
tricky.

Are you calling anything that displays graphics on a terminal GUI? If so,
the Curses module works on VMS, or you can snag the smg module and
interface directly to the SMG services.

If you could maybe describe what you're trying to do in some detail, it
might help narrow things down.

					Dan


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

Date: Tue, 25 May 1999 11:42:33 -0500
From: "Jeremy Fowler" <jeremy@microlink.net>
Subject: RE: Programming Web Graphics with Perl and GNU Software
Message-Id: <7iek4s$fl2$1@remarQ.com>


Thanks David Staff for replying to my message. I didn't mean to offend
anyone by saying that I don't have time to sort through 30,000 news posts. I
have great respect and admiration for the people that read these posts
everyday and help endless amounts of newbies with their problems. Perhaps
one day I too will be come a perl guru, and spend my time helping others.
However, until that day, I will probably post many messages asking for help.
So please, accept my personal apology. I was at the time really frustrated
with this program and I shouldn't have taken it out in my post.

I am still having problems with this program though...

Let me give you some more background. I've tried this script (counter.pl) on
both a RH5.2 Linux box with perl v5.004_05 and a Sun System V 4.0 with perl
5.005_03. It's a web counter program that's called with the <IMG
SRC="cgi-bin/counter.pl?countfile=countfile.txt&style=default"> tag from an
html document. The two variables passed to it is the countfile, (which is a
plain text file with the first line holds the current count, and the second
lists the allowed hosts that have access to this script), and the style
variable. It tells the script which folder to look in for the images,
"default" is the default style for the counter, so I put the images in a
folder called default. There are 10 images 0.gif through 9.gif in this
folder. The source can be found on the author's page here:

http://www.as220.org/shawn/pwgexamples/10ex.htm

(The first example is the BrokenImage.pm Module, this is needed for
counter.pl which follows immediately after. Ignore the examples after
counter.pl, they have no relevance.)

First off, if I leave the second line out of the countfile.txt (allowed
hosts), perl gives me this error:
(If I run it at a command line: $ ./counter.pl countfile=countfile.txt
style=default > output.txt)

"Use of uninitiated value at ./counter.pl line 69, <COUNT> chunk 1."
"Use of uninitiated value at ./counter.pl line 73, <COUNT> chunk 1."
"Use of uninitiated value at ./counter.pl line 88, <COUNT> chunk 1."
"Segmentation Fault"

If I try calling it from a html document all I get is a broken Image.

However if I do put my server as a host on the second line in the
countfile.txt I get the black_box() "You do not have privileges to access
this counter" which is called from the BrokenImage.pm Module. This shouldn't
happen because my computer is an allowed host. However, I still get the
segmentation fault if I run it from the command prompt.

If someone else could please look at this code and maybe email me with what
I am doing wrong. I would be very grateful.

Thanks again,

-Jeremy-
jeremy@microlink.net

Visit my home page at http://www.microlink.net/~jeremy/


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

Date: Wed, 26 May 1999 01:26:41 GMT
From: Otis Gospodnetic <otis@my-dejanews.com>
Subject: RDF parser for My Netscape type RDF
Message-Id: <7ifikf$qqt$1@nnrp1.deja.com>

Hello,

Has anyone written or does anyone know of a Perl module/script that can
parse My Netscape (or Slashdot) RDF files?

I looked at XML::Parse manpage which turned me off, to be honest... :(

Thank you,

Otis


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: Wed, 26 May 1999 00:36:06 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: s/// multiple lines in file from cmd line
Message-Id: <FCBDo6.4Au@news.boeing.com>

In article <7idbfr$692$1@nnrp1.deja.com>,
Otis Gospodnetic  <otis@my-dejanews.com> wrote:
>Hello,
>
>I was wondering if it is possible to replace something like this:
>
>message_footer      <<  END
>------------------------------------------------------------------------
>To UNSUBSCRIBE send a message to $LIST-request@mysite.com with
>UNSUBSCRIBE in the body of the message.
>------------------------------------------------------------------------
>END
>
>with:
>message_footer      <<  END
>END
>....

Another possibility if there's a file too big to slurp:

perl -pi.bak -e '/-{60,}/ && $s++;s/.*//s if $s;$s %= 2' *.config


hth,
--
Charles DeRykus


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

Date: Tue, 25 May 1999 16:56:25 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Sorting Problem
Message-Id: <MPG.11b4d884f09964d4989af7@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <7if1ac$e0r$1@nnrp1.deja.com> on Tue, 25 May 1999 20:31:07 
GMT, garthwebb@my-dejanews.com <garthwebb@my-dejanews.com> says...
> > I need to sort 1-2-3-4-5 and so on.  Does anyone know how to do
> > this?
> 
> # Assume: @a = ('page1.gif', 'page2.gif', ...);
> 
> @sorted = sort { ($a=~/(\d+)/)[0] <=> ($b=~/(\d+)/)[0] } @a;

Beautiful.  Just don't try it on a large number of elements.  It will 
prove to be horrifyingly slow.  Read the documentation to see why.

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


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

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

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