[12509] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6109 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 23 13:07:19 1999

Date: Wed, 23 Jun 99 10:00:18 -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           Wed, 23 Jun 1999     Volume: 8 Number: 6109

Today's topics:
        'warn' question ? (Hong Yuan)
    Re: AIX, sar and perl (what am I doing wrong?) jgruiz1@ibm.net
    Re: AIX, sar and perl (what am I doing wrong?) jgruiz1@ibm.net
        Cooperating processes... (Mitch)
    Re: Does Perl have a future? <matt.sergeant@ericsson.com>
        extracting (Brian Pontz)
    Re: function to read a line & return it <emschwar@rmi.net>
        Modify @INC? <marco.anstett@okay.net>
    Re: Modify @INC? <craig@mathworks.com>
    Re: More fun with Hashes of Lists... <dave@dave.org.uk>
    Re: More fun with Hashes of Lists... <pavel@asei.cz>
    Re: More fun with Hashes of Lists... (Tad McClellan)
    Re: More fun with Hashes of Lists... (Larry Rosler)
    Re: Need Help with interesting Perl problem. <craig@mathworks.com>
    Re: Need Help with interesting Perl problem. (Tad McClellan)
    Re: Need Help with interesting Perl problem. <jdporter@min.net>
    Re: Need Help with interesting Perl problem. (Larry Rosler)
        Needle in a hash/list... (Mitch)
    Re: NT - Server Up time <ehpoole@ingress.com>
        Passing Arrays as References <abode@serv1.jump.net>
    Re: Passing Arrays as References <dave@dave.org.uk>
    Re: Running simple perl scripting <martin@adoma.se>
        simple <technology@workmail.com>
        Sys::Syslog and syslog entries ? <perrot@francenet.fr>
    Re: Using ROLLBACK() w/ DBI Module (Tom Mornini)
    Re: Viral matters [completely off-topic] <matt.sergeant@ericsson.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 23 Jun 1999 09:51:52 -0700
From: hongy@panther.cs.ucla.edu (Hong Yuan)
Subject: 'warn' question ?
Message-Id: <7kr3b8$hce$1@panther.cs.ucla.edu>

Hi,

I've modified File::Find so that I can specify a maxlevel N to do 
breadth-first recursion in the dir hierarchy. It works now, ignoring
files/dirs deeper than N levels from the topdir. 

There're warn lines in the module that looks like this:

  dosomething || (warn("warning: ...\n"), return);

I can't get the warning to print to STDERR.  But if I change the line
to this:

  dosomething || (warn("warning: ...\n") and next);

then, the warning message will be printed to STDERR. 

Why?

Thx!!
Hong Yuan.


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

Date: Wed, 23 Jun 1999 15:47:49 GMT
From: jgruiz1@ibm.net
Subject: Re: AIX, sar and perl (what am I doing wrong?)
Message-Id: <7kqviv$ada$1@nnrp1.deja.com>

I read the FAQ already and I think I am following the suggestions from
there, using 'autoflush', but it still doesn't work... I think there is
something special about how 'sar' works that prevents perl's 'autoflush'
or the $| variable to work. If I use another command, like 'vmstat'
instead of 'sar' works OK.

In article <xkfiu8flwy2.fsf@valdemar.col.hp.com>,
  Eric The Read <emschwar@rmi.net> wrote:
> jgruiz1@ibm.net writes:
> > The script works, but it never saves data to the output file
> > "sar.out" until the close(SARF) gets executed. What should I
> > do to save data to the output file after every sample (line)?
>
> Read the FAQ.
>
> Specifically, perlfaq5: "How do I flush/unbuffer a filehandle?  Why
must
> I do this?"
>
> > Any ideas?? by the way, I am running perl 5.004_04 under AIX
> > 4.3.2.
>
> Then you have all the documentation you need on your system already.
30
> seconds spent on your computer is well worth 30 hours (or even 30
> minutes) waiting for someone to send a reply to a newsgroup posting.
>
> -=Eric
>


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


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

Date: Wed, 23 Jun 1999 15:50:32 GMT
From: jgruiz1@ibm.net
Subject: Re: AIX, sar and perl (what am I doing wrong?)
Message-Id: <7kqvo2$agc$1@nnrp1.deja.com>

Is not that easy... autoflush does the same as the code you described.

In article <3770AA98.398D31B3@fos.su.se>,
  Stefan Lindberg <stefan@fos.su.se> wrote:
> Quick and easy:
>
> Insert this somewhere at the beginning of your script.
>
> # Begin code
> $oldhandle = select(FILEHANDLE);
> # This line will make FILEHANDLE flush after each line
> # if separator is \n which it normally is
> $| = 1;
> # Make stdout standard filehandle again
> select($oldhandle);
> # End code
>
> /S. Lindberg
>
> jgruiz1@ibm.net wrote:
>
> > I have the following perl script. Which is supposed to execute
> > the UNIX 'sar' command, descard any header information from the
> > sar output and save the performance data in an output file.
> >
> > The script works, but it never saves data to the output file
> > "sar.out" until the close(SARF) gets executed. What should I
> > do to save data to the output file after every sample (line)?
> >
> > Any ideas?? by the way, I am running perl 5.004_04 under AIX
> > 4.3.2.
> >
> > Thanks,
> > Juan
> >
> > ----- script starts here -----
> > #!/usr/bin/perl
> >
> > use FileHandle;
> >
> > sub collect_sar
> > {
> >   my($samples,$interval,$outf)=@_;
> >   open(SARF,">$outf");
> >   autoflush SARF;
> >   @fargs=("/usr/sbin/sar",$interval,$samples);
> >   open(SAR,"@fargs|");
> >   autoflush SAR;
> >
> >   while(<SAR>) {
> >     if ( /^\d\d:\d\d:\d\d\s+\d+\s+\d+\s+\d+\s+\d+/ ) {
> >       print SARF $_;
> >     }
> >   }
> >   close(SAR);
> >   close(SARF);
> > } # end collect_sar
> >
> > &collect_sar(15,5,"sar.out");
> >
> > ----- script ends here -----
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
> --
> ============= FOOS - Chemistry ====================
> Stockholm University   URL: www.fos.su.se/~stefan/
> FOOS - Chemistry       Phone: +46 8 674 7481
> Stefan Lindberg        Cell:  +46 70 491 0223
> S-106 91 Stockholm     Office: Arrhenius,c454
>           E-Mail: stefan@fos.su.se
>       Get PGP public key at my homepage
> ===================================================
>
>


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


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

Date: Wed, 23 Jun 1999 16:42:22 GMT
From: portboy@home.com (Mitch)
Subject: Cooperating processes...
Message-Id: <37709ce0.399131240@24.0.3.71>

I have two process running that need to know when each other changes a
certain variable.  However, this variable (we'll call it $foo) is both
local to each process, however, if one changes there $foo variable,
the other process needs to know about it.  How can I do this?

 .mitch


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

Date: Wed, 23 Jun 1999 17:05:16 +0100
From: Matt Sergeant <matt.sergeant@ericsson.com>
Subject: Re: Does Perl have a future?
Message-Id: <377105BC.6FAE6B87@ericsson.com>

brian d foy wrote:
> 
> In article <37709ABB.5FC3501@ericsson.com>, Matt Sergeant <matt.sergeant@ericsson.com> posted:
> 
> > Along with the points others have made, I think the core issue is
> > mod_perl for ISP's for people uploading their own scripts. I don't think
> > it's really a viable proposition, because there are certain things you
> > need to consider:
> >
> > A badly written mod_perl script can bring a server to it's knees.
> 
> i've written lots of bad mod_perl and have yet to see Apache
> crash because of it.  i'd be interested in any situations you've
> found where Apache is vulnerable.  i know several ISPs which allow
> mod_perl and this issue has never come up when i've talked to their
> server gurus.

I didn't say crash Apache, did I? You can bring a server to it's knees
more easily with mod_perl, simply because it's easier to use CGI
wrappers to prevent that, than it is to wrap mod_perl scripts. Although
Apache::SizeLimit can help this, I believe it only works when the _next_
request comes along, and doesn't prevent the entire system memory being
used on the current request.

> but to be fair, a badly written CGI script can bring a system (not
> just the server, to its knees.  i just dealt with a client who
> had so many wierd things going on in a CGI script that in a short
> time a gigabyte of error messages in the error log filled up the
> disk.
> 
> bad programming is bad in any domain.

What you've described is a bad sysadmin - not using a wrapper for his
ISP's CGI scripts to prevent severe process/memory usage.

> > mod_perl scripts run under the same permissions as the web server,
> > unlike a properly wrapped CGI script on an ISP's server (e.g. mine run
> > under my own user account's permissions, so I can't destroy other
> > people's web space).
> 
> there's a tradeoff there because something running under your UID
> can stomp on *your* data, whixh is even worse.  there are pitfalls
> on both sides of that.

Sure - but that's the sort of functionality that an ISP running hundreds
of web sites off 1 server needs.

> > Module updates (*.pm files) require a server restart
> 
> not if the server is configured well, such as using Apache::StatINC.

Yeah, provided your users don't want to use anything beyond
extraordinarily simple modules that are guaranteed not to leak memory...
:) See the mod_perl mailing list for plenty of evidence of
Apache::StatINC and PerlFreshRestart causing big memory headaches...

> > One option it to persuade your ISP to allow you to run a separate httpd
> > on another port that runs mod_perl, and have mod_rewrite redirect all
> > mod_perl requests to your separate server.
> 
> this would be a good idea despite the dubious nature of your
> comments.  there is a lot more power available via mod_perl when
> one can tweak the server at will.  having a mod_perl configuration
> that will please everyone is quite a challenge.

Absolutely. I really wish I could run it on my ISP so I could run
Apache::MimeXML (my first Apache module), and produce other stuff on it
(my CGI scripts are mod_perl clean, and run a bit slow under CGI), but I
completely understand ISP's not wanting to run it. - mod_perl is a
chainsaw for the developer, with all the danger therin too (albeit very
difficult to actually crash the server).

Matt.








 .


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

Date: Wed, 23 Jun 1999 16:54:12 GMT
From: pontz@channel1.com (Brian Pontz)
Subject: extracting
Message-Id: <37710f5e.8807785@news2.channel1.com>

Hello,
How would I extract "/test/" (without the quotes and slashes) and
"Testing" without the quotes and put them in a variable from a line
like this.

<A HREF="/test/">Testing </A>Whatever</H3>

 I had something like this but I cant get it to work right.

/$\<A HREF="\/(.*)"\/\>(.*)\<\/A(.*)>(.*)<(.*)>/
$first=$1;
second=$2;

Thanks
Brian Pontz 


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

Date: 23 Jun 1999 10:41:37 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: function to read a line & return it
Message-Id: <xkfn1xqna2m.fsf@valdemar.col.hp.com>

rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
> First, (undef) is not an array, it is a list.

I understand and know the distinction.  I just can never manage to keep
them straight, somehow.

> On the other hand, (undef) and () are rather different beasties.
> Perhaps that is the distinction you meant to make.

That's exactly what I was trying to say.  Basically, that "return undef;" 
is not the same as "return ();" or "return;".

> [On the gripping hand, I expect there will be corrections or
> clarifications of my above points. :) ]

Oh, probably.  You know how language flames generally work (even if the
language is Perl :^), after all.

-=Eric


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

Date: Wed, 23 Jun 1999 18:03:40 +0200
From: Marco Anstett <marco.anstett@okay.net>
Subject: Modify @INC?
Message-Id: <3771055C.FA579D4A@okay.net>

Hello,

I trying to add new directory to @INC while booting my Linux. To do so I
wrote a sort script. When finished, this script prints out the data in
@INC. At this time all directories are in @INC. But when I login an
write the following line perl -e 'print @INC;', the directry I added is
gone.

What must I do to keep the new directory permanent in @INC.

Thanks for your help.
Marco



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

Date: Wed, 23 Jun 1999 12:27:20 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Modify @INC?
Message-Id: <37710AE8.8FEE859F@mathworks.com>

Marco Anstett wrote:

> What must I do to keep the new directory permanent in @INC.
>

@INC can only be modified at runtime.  Inside your script(s), you would want
to do

BEGIN {
               push(@INC, "SOMEPATH");
}

Craig



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

Date: Wed, 23 Jun 1999 17:11:21 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: More fun with Hashes of Lists...
Message-Id: <37710729.E92C4D52@dave.org.uk>

Mitch wrote:
> 
> If I have a hash of a list like:
> 
> $foo{coke} where the coke array contains, sucks bites rules.  How can
> I easily append an element to the end of the coke array?  I know I can
> add an element like $foo{coke}[3] = "dominates";  However, can I add
> dominates to coke in a form like I just mentioned without knowing what
> size the array is?  Or do I need to get the array's size?  If so, how?

perldoc perldsc
perldoc -f push

Good luck,

Dave...


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

Date: Wed, 23 Jun 1999 17:55:11 +0200
From: Pavel Hlavnicka <pavel@asei.cz>
To: Mitch <portboy@home.com>
Subject: Re: More fun with Hashes of Lists...
Message-Id: <3771035F.F5038031@asei.cz>

see perldoc -f push

push @{$foo{coke}}, "xxx";

-- 
Pavel Hlavnicka
A.S.E.I. Ltd; Prague
tel.: +420 2 24106102
e-mail: pavel@asei.cz


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

Date: Wed, 23 Jun 1999 07:09:03 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: More fun with Hashes of Lists...
Message-Id: <f8fqk7.232.ln@magna.metronet.com>

Mitch (portboy@home.com) wrote:
: If I have a hash of a list like:

: $foo{coke} where the coke array contains, sucks bites rules.  How can
: I easily append an element to the end of the coke array? 


   push @{$foo{coke}}, 'dominates';


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


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

Date: Wed, 23 Jun 1999 09:09:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: More fun with Hashes of Lists...
Message-Id: <MPG.11daa67c9976acf2989c30@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <37708f2b.395622815@24.0.3.71> on Wed, 23 Jun 1999 15:39:00 
GMT, Mitch <portboy@home.com> says...
> If I have a hash of a list like:
> 
> $foo{coke} where the coke array contains, sucks bites rules.  How can
> I easily append an element to the end of the coke array?  I know I can
> add an element like $foo{coke}[3] = "dominates";  However, can I add
> dominates to coke in a form like I just mentioned without knowing what
> size the array is?  Or do I need to get the array's size?  If so, how?

How does one append an element to the end of any array?  Easily, using 
'push @array, $something'.  So:

push @{$foo{coke}}, 'dominates';

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


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

Date: Wed, 23 Jun 1999 12:01:22 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Need Help with interesting Perl problem.
Message-Id: <377104D2.BA76A2FB@mathworks.com>

big_sal@my-deja.com wrote:

> well, if $compare is set to "C++" or "X++" or anything "++", the script
> will stop executing.
>
> Any ideas about how to get it to work properly???

You should escape all non-word characters in this case:

$compare =~ s/(\W)/\\$1/;
if ( /$compare/) { ...

Craig



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

Date: Wed, 23 Jun 1999 07:12:54 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need Help with interesting Perl problem.
Message-Id: <mffqk7.232.ln@magna.metronet.com>

big_sal@my-deja.com wrote:

:      if (/$compare/is)

: well, if $compare is set to "C++" or "X++" or anything "++", the script
: will stop executing.

: Any ideas about how to get it to work properly???


   perldoc -f quotemeta


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


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

Date: Wed, 23 Jun 1999 16:22:52 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Need Help with interesting Perl problem.
Message-Id: <7kr1kd$b9b$1@nnrp1.deja.com>

In article <7kqsta$967$1@nnrp1.deja.com>,
  big_sal@my-deja.com wrote:
>
> $compare = "fred";
> foreach (bla bla bla) {
>      if ( /$compare/is ) {
>      }
> }
>
> if $compare is set to "C++" or "X++" or anything "++", the script
> will stop executing.

I suspect that you probably don't want to consider the pattern
(and you should call it a "pattern", not a "compare") as a
regular expression.  If that is the case, then you should do
the test like this:

	if ( /\Q$pattern/i ) {

Read perldoc -f quotemeta for a quick explanation, and
perldoc perlop under "Quote and Quote-like Operators" for more info.

Do you know why you had an /s on that pattern matching?

--
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, 23 Jun 1999 09:28:09 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need Help with interesting Perl problem.
Message-Id: <MPG.11daaaed770e6e85989c31@nntp.hpl.hp.com>

In article <377104D2.BA76A2FB@mathworks.com> on Wed, 23 Jun 1999 
12:01:22 -0400, Craig Ciquera <craig@mathworks.com> says...
> big_sal@my-deja.com wrote:
> 
> > well, if $compare is set to "C++" or "X++" or anything "++", the script
> > will stop executing.
> >
> > Any ideas about how to get it to work properly???
> 
> You should escape all non-word characters in this case:
> 
> $compare =~ s/(\W)/\\$1/;
                          ^g

> if ( /$compare/) { ...

The quotemeta() function does that easier, without the bug you posted.  
This is easier yet:

  if (/\Q$compare/) { ...

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


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

Date: Wed, 23 Jun 1999 16:52:09 GMT
From: portboy@home.com (Mitch)
Subject: Needle in a hash/list...
Message-Id: <3770a05d.400024755@24.0.3.71>

How can I find a value in a hash/list.  So, if my hash/list is

coke sucks:major bites:forever rules:dominates # the :'s are part of
each element.  So $hash{coke}[0] -> sucks:major

how, do i go through the hash/list and find rules or rules:dominates?

Thanks, mitch


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

Date: Thu, 24 Jun 1999 12:51:27 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: NT - Server Up time
Message-Id: <3772620F.DFB923B4@ingress.com>

[posted and emailed]

mirak63@yahoo.com wrote:
> 
> Hello,
> 
> Is there a way in Perl to be able to determine the time
> and date that an NT server came up?

If you have the resource kit you can grab the first line from "pstat.exe"
to obtain uptime.  Or you can use a util available called "uptime.exe"
available from http://www.sysinternals.com which also reports uptime.  Use
perl to strip their output and grab only the info you are interested in. 
Neither reports the date the machine was booted on, however.

If you use the Win32 extensions available in the Win32 Perl port, I
believe there are functions which allow you access to the event log, in
which case you could obtain the boot date and time by searching for the
most recent "EventLog" process start comment, or event # 6005.  

And for the person who suggested just printing "10 minutes", they should
know that an NT machine built with stable hardware and drivers can have
rather substantial uptimes.  I regularly have uptimes > 90 days and more
often than not, the reason the uptimes aren't substantially greater than
that is because I usually feel the need to upgrade the machine (e.g. more
disk space, a larger tape drive, etc) at some point in time.

-- 
Ethan H. Poole           ****   BUSINESS   ****
ehpoole@ingress.com      ==Interact2Day, Inc.==
(personal)               http://www.interact2day.com/


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

Date: Wed, 23 Jun 1999 11:00:48 -0500
From: Abode Development <abode@serv1.jump.net>
Subject: Passing Arrays as References
Message-Id: <Pine.GSO.4.02.9906231059270.18054-100000@serv1.jump.net>


I want to pass an array as a reference and am sure i have the syntax
messed up, so How would I do something similar to this:




#!/usr/local/bin/perl

use strict;


my @array = ('one','two');

my $arrayRef = \@array;


&test($arrayRef);



sub test
{
  my $myRef = shift;
  print "Test: $myRef->[0]\n";# :: $myRef->[1]\n";
}




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

Date: Wed, 23 Jun 1999 17:15:16 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Passing Arrays as References
Message-Id: <37710814.4A67B5D2@dave.org.uk>

Abode Development wrote:
> 
> I want to pass an array as a reference and am sure i have the syntax
> messed up, so How would I do something similar to this:
> 
> #!/usr/local/bin/perl
> 
> use strict;
> 
> my @array = ('one','two');
> 
> my $arrayRef = \@array;
> 
> &test($arrayRef);
> 
> sub test
> {
>   my $myRef = shift;
>   print "Test: $myRef->[0]\n";# :: $myRef->[1]\n";
> }

What makes you think you have the syntax messed up? Did you test it? It
seems to work OK to me. Perhaps I wasn't expecting the same result that
you were.

Dave...


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

Date: Wed, 23 Jun 1999 17:45:37 +0100
From: "Martin Quensel" <martin@adoma.se>
Subject: Re: Running simple perl scripting
Message-Id: <7kr0l3$pn$1@zingo.tninet.se>


>we are trying to run a simple perl 5 script on an NT internet server
running
>IIS 4.
>when we run these simple scripts ( e.g making a wb page say 'hello' ) we
get
>all the formatting ( print , \n , etc ) that goes with the HTML as well as
>the text ( properly formatted ).
>
>anyone know what we're doing wrong ?  we seem to have tried everything


This isent really a perl question, its a IIS question.
You are not saying anything that can help us solve your problem.

If a stranger calls me up and asks: "Hi, i have a problem getting to work.
Everymorning i sit down in the kitchen, and eat breakfast, then i go into
the garage, trying to drive to work. But i never get there. you know what i
am doing wrong?

No, i do not know what you are doing wrong....Do you have a car to drive??
Do you have fuel in your car?? Do you know how to drive??

So lets start shall we?

Have you tried the right Newsgroup?
Do you have Perl installed? (not the scripts...Perl itself! you can get it
from www.activestate.com, for win32)
How does the script look?? give us some code maybee?? (or else its like not
letting the mecanic take a look at your car when you ask him to repair it)
Have you tried looking at the FAQs about IIS????

Good luck
Martin Quensel





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

Date: Wed, 23 Jun 1999 09:38:27 -0700
From: Raj <technology@workmail.com>
Subject: simple
Message-Id: <37710D83.D361AFA4@workmail.com>

when i use
system("ls a* > file1");
 in my CGI script it's listing the entire paths into the txtfile 'file1'

whereas when i run the same ls command at the unix prompt, i get only
the filename listing into 'file1' , which is what i want.

What do i need to do in my system command then?



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

Date: 23 Jun 1999 18:46:35 +0200
From: Gildas PERROT <perrot@francenet.fr>
Subject: Sys::Syslog and syslog entries ?
Message-Id: <rdemj2lv9w.fsf@localhost.francenet.fr>

Hi,

I am using Sys::Syslog with :

#!/usr/bin/perl
use Sys::Syslog;
syslog('mail|info', "hello");

In the syslog, I can read :

Jun 23 18:24:17 localhost perrot: hello

What are the "localhost" and "perrot" strings ? How can I get rid of
them ?

Thanks in advance for your help.		Gildas.

-- 
Gildas PERROT, perrot@francenet.fr         __o
FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_
http://www.francenet.fr            ---- (_)/ (_)


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

Date: Wed, 23 Jun 1999 16:11:22 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: Using ROLLBACK() w/ DBI Module
Message-Id: <tmorniniFDsFMy.Ls@netcom.com>

Jackie Stock (jackie.stock@2jhuapl.edu) wrote:

: I am trying to issue a rollback command to the Oracle database
: (  $dbh->rollback; )
: And, I get the response that the rollback is ineffective because
: autocommit is on.
: Okay, so how do I set autocommit to off.
: I tried
: ( $dbh->do("set autocommit off"); )
: but it didn't like that.

Have you ever considered perldoc DBI?

my $dbh=DBI->connect($dsn,$user,$password,{AutoCommit=>0});

-- Tom Mornini
-- InfoMania


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

Date: Wed, 23 Jun 1999 17:18:33 +0100
From: Matt Sergeant <matt.sergeant@ericsson.com>
Subject: Re: Viral matters [completely off-topic]
Message-Id: <377108D9.16351586@ericsson.com>

Tom Christiansen wrote:
> 
> Feel free to point others thither.  No, Unix has no viruses.  Neither
> does Perl.

BS. So I take it "Bliss" is a figment of my imagination?

Please don't CC me on any replies - I read the NG.

Matt.


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

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

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