[13340] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 750 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 9 12:07:27 1999

Date: Thu, 9 Sep 1999 09:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 9 Sep 1999     Volume: 9 Number: 750

Today's topics:
        6 first numbers of a chain of numbers? <olivier.maas@at-lci.com>
        batch in Perl? <tom.kralidis@ccrs.nrcanDOTgc.ca>
    Re: bin2hex and back again <malcolm.dewjones@moh.hnet.bc.ca>
        How do I load libraries from a non-default path ?? <Lars.Fricke@gmx.net>
    Re: How do I load libraries from a non-default path ?? <messias@freepage.de_antispam_>
    Re: How to echo "% f"? (Larry Rosler)
    Re: How to send control codes from Expect module (Kragen Sitaker)
        Mac Perl problems <ianm@raremedium.com>
    Re: Need help with some pattern matching... <Care227@ibm.net>
    Re: perl objects and hashes of hashes (I.J. Garlick)
    Re: Please help a newbe jp_48504@my-deja.com
    Re: problem with errormessages. <messias@freepage.de_antispam_>
    Re: problem with s///e structure <Chris.vanUffelen@BodSch.BenP.WAU.NL>
    Re: Programmer's Editor <AgitatorsBand@yahoo.com>
    Re: Programmer's Editor <aqumsieh@matrox.com>
    Re: Randal vandal aborts Schwartz (Randal L. Schwartz)
    Re: redirection problems (Kragen Sitaker)
        regexp help: Cap First Letter, between tabs <rcyahnke@doit.wisc.edu>
    Re: regexp help: Cap First Letter, between tabs (Kragen Sitaker)
        setuid & real uid <ccarter@richmond.edu>
    Re: Smile... <nospam@nospam.de>
    Re: Sorry, Re: Why, why, why, -w and use strict? <dsparling@my-deja.com>
    Re: Sorry, Re: Why, why, why, -w and use strict? (Bart Lateur)
    Re: Uninitialised variable in sub - debugging and avoid (Rory C-L)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Thu, 09 Sep 1999 17:19:56 +0200
From: Olivier Maas <olivier.maas@at-lci.com>
Subject: 6 first numbers of a chain of numbers?
Message-Id: <37D7D01C.B44FE9FC@at-lci.com>

Hi
I have a chain of numbers han can be more than 6 numbers

test =~ s/(\d\d\d\d\d\d)\d+/$1/;

works but is there something better?
thanks
blue skies and soft landings
olivier
please also mail answer to maas@ensae.fr



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

Date: Thu, 09 Sep 1999 11:01:52 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: batch in Perl?
Message-Id: <37D7CBE0.EE549C1F@ccrs.nrcanDOTgc.ca>

Hi,

I'm porting some shell scripts to Perl, and am having problems with
simumating the 'batch' command on a set of files.

The shell script utilizes batch like so:

batch < file0.tmp;

I have treid this in Perl with 

system("batch < $file"); # $file points back to file0.tmp in this case.

 ...afterwhich the system (and display) just hangs forever, pushing it
into an 'at' command.  Under the shell script, the prompt is given back
and the batch command works through in processing the file.

Any ideas on how to best make this work??

Thanks for any advice.

 ..Tom

-----------------------------------------------------------------------------------------
Tom Kralidis                                  Geo-Spatial Technologist 
Canada Centre for Remote Sensing              Tel: (613) 947-1828
588 Booth Street , Room 241                   Fax: (613) 947-1408
Ottawa , Ontario K1A 0Y7                     http://www.ccrs.nrcan.gc.ca
-----------------------------------------------------------------------------------------


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

Date: Thu, 09 Sep 1999 08:27:16 -0700
From: Malcolm Dew-Jones <malcolm.dewjones@moh.hnet.bc.ca>
Subject: Re: bin2hex and back again
Message-Id: <37D7D1D4.23112A2F@moh.hnet.bc.ca>

You could look at the MIME stuff.  It makes reference to a Base64
code/decode facility, which does this sort of thing.

Kevin Howe wrote:
> 
> I would like to be able to store binary files such as .gif files in my
> databases.  I read that this could be done by converting the binary file to
> hexidecimal to store it in the database, and then converting it back
> (hexidecimal to binary) when the item is to be used.
> 
> I have found several scripts which convert from binary to hexidecimal
> (binhex.pl, Data::HexDump) but these do not to the conversion back to
> binary. On the perl site under http://www.perl.com/CPAN/scripts/index.html
> there are 2 scripts bin2hex and hex2bin which appear to solve the problem,
> but are meant to be used as command-line programs, and could not easily be
> hacked into something useful. I'd like to make a module which would make
> this simple, as follows:
> 
> $Convert = new BinHexConvert;
> $Convert->bin2hex(@lines);
> $Convert->hex2bin(@lines);
> 
> What exactly do you need to do to convert between the two?
> 
> Much thanks.


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

Date: Thu, 09 Sep 1999 17:05:03 +0200
From: Lars Frick <Lars.Fricke@gmx.net>
Subject: How do I load libraries from a non-default path ??
Message-Id: <37D7CC9E.AE14E083@gmx.net>

Ok. First of all: Hi to all perl freaks.

Now my problem:

I need to load a few libraries, but i cannot install them in the
/usr/lib/perl/....whatever directory ... how can i call my script to
load them from a different directory like /usr/home/test/libs/    ???

thanx



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

Date: Thu, 09 Sep 1999 17:58:48 +0200
From: Matthias Nutt <messias@freepage.de_antispam_>
Subject: Re: How do I load libraries from a non-default path ??
Message-Id: <37D7D938.29EC439C@freepage.de_antispam_>

Lars Frick wrote:
> 
> Ok. First of all: Hi to all perl freaks.
> 
> Now my problem:
> 
> I need to load a few libraries, but i cannot install them in the
> /usr/lib/perl/....whatever directory ... how can i call my script to
> load them from a different directory like /usr/home/test/libs/    ???
> 
> thanx
use lib "this/is/the/path";

and RTFM!!

Matthias


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

Date: Thu, 9 Sep 1999 07:59:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to echo "% f"?
Message-Id: <MPG.12416b34ec817460989f3a@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <37d7a877.0@news.smith.edu> on 9 Sep 99 12:30:47 GMT, Joseph 
O'Rourke <orourke@grendel.csc.smith.edu> says...
> When I try to read the string "% f" and print it out, it prints
> as " 0.000000".  I am using this simple program test.pl:
> 
> #!/usr/bin/perl
> while (<>) {
>         printf $_;
> }
> 
> and running it with terminal input:
> 
> % test.pl	<- Unix command
> % f		<- User input
>  0.000000	<- Program output
> 
> I've tried protecting the % with \% but to no avail.  Can someone
> help me?  Thanks.

You would have to protect the '%' with '%%', because you are using it as 
the format expression of a printf() statement which has no arguments.  
Why are you doing that?  Use print() instead of (), unless you really 
want the formatting capabilities that printf() provides.

From `perldoc -f printf`:

Don't fall into the trap of using a printf() when a simple print() would 
do. The print() is more efficient and less error prone. 

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


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

Date: Thu, 09 Sep 1999 15:23:45 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How to send control codes from Expect module
Message-Id: <5iQB3.13175$r5.904600@typ11.nn.bcandid.com>

In article <7r88dl$8dl$1@nnrp1.deja.com>, Bill  <wpflum@my-deja.com> wrote:
> What I'm trying to do is
>have the perl program telnet in and check the mail for a person in the
>accounting program and then mail a normal email through the unix system
>which I can then check with PC or Mac based email reader.

Cool.  Good luck :)

>sure you don't have any hanging out there and you know how end users
>are so reliable when it comes to doing things manually.

Yes, computers are much better at that :)

>to my question.  I need to send several control keys such as function
>keys and especially the 'DO' key which are available on a vt220
>terminal or emulator to the telnet program so I can move through the
>session to the email portions of the accounting software.  I've tried
>sending what I thought was the correct ascii equivilents but they don't
>seem to work, any ideas how to send those keys.

So it sounds like you know how to send control characters with
Expect.pm, you just don't know which control characters to send --
right?  (Can you get sending simple control characters like tab \x9 to
work?)

>  Even better anyone
>have a chart showing exactly what the ascii codes are for these keys?
>I tried just pressing the keys at a unix prompt but the codes generated
>don't appear to be the ascii or hex numbers I need.  I'm lost so feel
>free to tell me where to go ;)

The straightforward way would be to press them while running this script:
perl -ne 'print unpack ("H*", $_), "\n"'

Here's a sample session:
kirk:/home/kragen/ perl -ne 'print unpack ("H*", $_), "\n"'

0a

0a
^[[[A
1b5b5b410a

The '0a's are linefeed characters, which Unix uses for newlines; the
^[[[A is me pressing F1, which generates escape, left square bracket,
left square bracket, capital A -- or in hex, 1b, 5b, 5b, 41.  (The 0a
is from me hitting return again.)

HTH.
Kragen
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Thu Sep 09 1999
60 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 9 Sep 1999 11:42:46 -0400
From: "Ian Murphy" <ianm@raremedium.com>
Subject: Mac Perl problems
Message-Id: <hzQB3.42$Gi.18457@news.exodus.net>

I have written a perl program to convert digits in filenames on the
macintosh to hexidecimal so strange looking filenames will translate to the
PC (stuff with * and \ and such).  Unfortunately I can't get it to run
properly using MacPerl.  Specifically,
it requires command line arguments, and while there is a command line
function in Mac Perl (called One-liner) I don't know how to execute a script
using this command line.

If anyone could give me some tips on this it would be greatly appreciated.




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

Date: Thu, 09 Sep 1999 11:09:51 -0400
From: Drew Simonis <Care227@ibm.net>
Subject: Re: Need help with some pattern matching...
Message-Id: <37D7CDBF.EAF8E9CD@ibm.net>

> 
> s/\(.*// would do the trick on the line you posted.  Bill Moseley's
> regex didn't work because he didn't \ the (.  So would s/ .*//, and
> s/\(.*?\)//, and several other possibilities.  I'd be happy to explain
> these to you if you'd like, char by char.
> 

lemme see..  s/\(.*?\)//	

Search for a ( followed by any number of char's followed by a ) and
replace it with nothing?


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

Date: Thu, 9 Sep 1999 15:47:07 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: perl objects and hashes of hashes
Message-Id: <FHsuIJ.CyF@csc.liv.ac.uk>

In article <37D711C5.D669826A@blur.com>,
duane powell <duane@blur.com> writes:
> My question is about hashes of hashes and perl objects. It's clear to me
> how to create a self extending object with a hash reference. But how do
> I define a hash of hashes within a class?
> 

Do hope there is a use strict somewhere in the code you didn't cut and
paste. What there wasn't? shame on you. (Bet there was no -w either).

> package Tree;
> sub new {
>  my($class,$name) = @_;
>  my $class = ref($class) || $class;
   ^^
Get rid of that. No need. It may actually ruin anything you try to use
this package to inherit from, will need some one more expert than me to
confirm.

> 
>  my $self    = {};
>  $self->{NAME}   = $name;
> 
>  $self->{_BRANCHES}  = {};

Personally I have a tendancy to do
	my $self     = {
		NAME      => $name,
		_BRANCHES => {},
	};

for the base class. But that's just me.

> 
[snipped, what looks like ok code, it runs anyway]

>   print "\t", $b, "\t", $self->{_BRANCHES}->{$b}, "\n";

would change the above to

	print "\t$b\t$self->{_BRANCHES}->{$b}\n";

personally.

Exactly where are you having a problem? The code you used could have come
from the camel if memory serves. You just changed a few variables and
added a couple of accessor methods.

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk

Democracy is a device that insures we shall be governed no better than
we deserve.
                -- George Bernard Shaw



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

Date: Thu, 09 Sep 1999 15:54:30 GMT
From: jp_48504@my-deja.com
Subject: Re: Please help a newbe
Message-Id: <7r8l7e$i89$1@nnrp1.deja.com>

In article <37D7B9E1.CAEA7062@mediaone.net>,
  edgar <cook@mediaone.net> wrote:
> #! perl -w
> use strict;
> ### taken from perl cook book pp281  with chg's
>
> print " To store an array of lines in reverse order  \n";
> my @lines = reverse (<DATA>);
> print @lines;
> print "\n Now  reversing the order!! or back to what it looks like ???
\n";
> my @rev_lines =  reverse @lines;
>
> for  ( @rev_lines){
>    print $_;
> }
>
> __DATA__
> 1 this is  first      145
> 2 in      second      135
> 3 asdffdsa  last      124
>
> tried on a win9x PC
> hope this helps
> -cookie
>
>
Thanks Cookie,
Will I be able to have my script read the specific numbers from the
file and then provide a total to the user?
Thanks
JP


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


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

Date: Thu, 09 Sep 1999 17:18:30 +0200
From: Matthias Nutt <messias@freepage.de_antispam_>
Subject: Re: problem with errormessages.
Message-Id: <37D7CFC6.4158666@freepage.de_antispam_>

> 
> Use of uninitialized value at C:/perl/site/lib/Tk.pm line 367
> Use of uninitialized value at C:/perl/site/lib/Tk.pm line 367

I have similar warnings, but i think this has nothing to to with the crash!

> $startbutton =
> $hframe->Button(-text=>"search", -command=>sub{startsearch()})->pack(-fill=>
> "x", -side=>"top");
> $top->bind("<KeyPress-Return>"=>sub{startsearch()});

i use : 
$main_window->Button(-text => "Pitch",
		     -command => [ \&exercise, $tones ]
		     )->pack(-expand => "yes", -fill => "both");

in your words:

$startbutton =
$hframe->Button(-text=>"search", -command=> [ \&startsearch ])->pack(-fill=>
"x", -side=>"top");


or :
$main_window->Button(-text => "Exit",
    -command => sub{destroy $main_window}
)->pack(-expand => "yes", -fill => "both");

this works well with activePerl and windows95

cheers Matthias


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

Date: Thu, 09 Sep 1999 17:09:49 +0200
From: Chris van Uffelen <Chris.vanUffelen@BodSch.BenP.WAU.NL>
To: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: problem with s///e structure
Message-Id: <37D7CDBD.B4D@BodSch.BenP.WAU.NL>

Tom Phoenix wrote:
> 
> On Thu, 9 Sep 1999, Chris van Uffelen wrote:
> 
> > I do this using a
> >
> > $data =~ s/.../.../ge;
> 
> > So the question is: how do I prevent Perl from writing the number of
> > changes (3 in this case) to $data.
> 
> Could you show us some actual code? It sounds as if you're doing something
> on the right side of the s///ge that you don't mean to be doing. I wish I
> could be more specific. (By the way, my best guess at this point is that
> you didn't mean to use the /e modifier.)

I'm afraid I've found a solution to my problem (see below), nevertheless
I didn't expect the result of the erroneous construction:

   $i = 0;
   $data =~ s/\<\|(.*?)\|\|(.*?)\|\|(.*?)\|\>/
      ++$i;($abbr[$i],$texp[$i],$txtp[$i])=($1,$2,$3)/ge;

This construction replace the RE between the first two slashes for 3
(the number of substitutions, i think), whereas I expected the mere
removal
of the RE.

Posing the question has lead me to a solution I believe, for

   $i = 0;
   while ($data =~ m/\<\|(.*?)\|\|(.*?)\|\|(.*?)\|\>/g) {
      $i++;
      ($abbr[$i],$texp[$i],$txtp[$i])=($1,$2,$3);
   }
   $data =~ s/\<\|.*?\|\|.*?\|\|.*?\|\>//g;

works according to my intention, this construction used above is
followed by something like

   for ($j=1; $j<=$i; ++$j) {
      $data =~ s/\<\|$abbr[$j]\|\>/$texp[$j]/g;

which replaces abbreviations for one of two meanings.

thanks for your attention,

Chris

> 
> Ideally, you should post a short program or runnable excerpt, five or six
> lines, something like this:
> 
>     $data = 'my sample data';
>     $data =~ s/(\w+)/ length $1 /ge;
>     print "Result is '$data'.\n";
> 
> Armed with that and some information on what you expected the output to
> be, we may be able to help you. Good luck!
> 
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/


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

Date: Thu, 09 Sep 1999 15:22:46 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: Programmer's Editor
Message-Id: <ahQB3.12$kU.208@news.shore.net>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:
: You'd stop getting my ire up if you merely posted a disclaimer
: "handles basic Perl constructs only, but can be easily fooled by
: typical code". 

Are you implying that the examples you gave before are "typical" Perl
code?

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Thu, 9 Sep 1999 10:32:49 -0400 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Programmer's Editor
Message-Id: <x3ylnaggnov.fsf@tigre.matrox.com>


elephant@squirrelgroup.com (elephant) writes:

> Randal L. Schwartz writes ..
> 
> >On rare occasion, I must change the code I write so that it doesn't
> >confuse cperl-mode, so that cperl-mode doesn't continue to confuse me.
> 
> can't you just switch the colour coding off ?

Yes you can, but you are then asking Emacs to stop helping you. I
also primarily use Emacs for my Perl editing, and often encounter
situations where my code would confuse cperl-mode, but I try to help
cperl-mode help me rather than shutting it off. It's advantages
outweigh its disadvantages by far.

--Ala



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

Date: 09 Sep 1999 08:38:54 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Randal vandal aborts Schwartz
Message-Id: <m11zc8rt69.fsf@halfdome.holdit.com>

>>>>> "Gisle" == Gisle Aas <gisle@aas.no> writes:

Gisle> URI-1.03 (released 1999-06-24) had a fix for this.

I apologize then.  Shows you how much Cargo Cult Programming gets you
in trouble. :)

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Thu, 09 Sep 1999 15:39:05 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: redirection problems
Message-Id: <twQB3.13223$r5.908992@typ11.nn.bcandid.com>

In article <37D7AA6F.821037E6@yahoo.com>, Nico  <weinachter@yahoo.com> wrote:
>I'm working on a web server with perl scripts and i have a little
>problem with path. In fact, i'm trying to make a script that can
>redirect a user on another site but i don't know how to do to send him
>there. Does anyone could helpme ?

Assuming you're using CGI.pm, 

          print $query->redirect('http://somewhere.else/in/movie/land');

(That's from the CGI.pm documentation.  man CGI or perldoc CGI if you
have CGI.pm installed.)

Kragen
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Thu Sep 09 1999
60 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 09 Sep 1999 10:03:22 -0500
From: "Ross Yahnke" <rcyahnke@doit.wisc.edu>
Subject: regexp help: Cap First Letter, between tabs
Message-Id: <7r8i80$ufu$1@news.doit.wisc.edu>

Hi all - I've tried various ways to do this but am stumped. Given a text 
string:
RCY  <tab>  ROSS C. HOLLINGSWORTH-YAHNKE, ESQ.  <tab> rcyahnke@doit.wisc.edu

(replace <tab> with \t )


I'd like to get:

RCY  <tab>  Ross C. Hollingsworth-Yahnke, Esq.  <tab> rcyahnke@doit.wisc.edu


I've tried things like
    s/\t(\w+)/\t\u\L\1/;

Which doesn't quite work. I could go on about the other things I've tried...
but any hints? Or should I just split on the tabs, do the adjustment, and
put the string back together? I'd like to try and make this a one-liner!

Thanks! - Ross


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

Date: Thu, 09 Sep 1999 15:35:50 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: regexp help: Cap First Letter, between tabs
Message-Id: <qtQB3.13213$r5.908343@typ11.nn.bcandid.com>

In article <7r8i80$ufu$1@news.doit.wisc.edu>,
Ross Yahnke <rcyahnke@doit.wisc.edu> wrote:
>RCY  <tab>  ROSS C. HOLLINGSWORTH-YAHNKE, ESQ.  <tab> rcyahnke@doit.wisc.edu
>I'd like to get:
>RCY  <tab>  Ross C. Hollingsworth-Yahnke, Esq.  <tab> rcyahnke@doit.wisc.edu
>
>I've tried things like
>    s/\t(\w+)/\t\u\L\1/;

1 while s/\t(.*\w)([A-Z]+)(.*)\t/\t$1\L$2\E$3\t/;

>Or should I just split on the tabs, do the adjustment, and
>put the string back together?

Probably.

> I'd like to try and make this a one-liner!

That way lies insanity.  The one-liner above is brittle and hard to
understand, IMHO.

Kragen
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Thu Sep 09 1999
60 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: 9 Sep 1999 15:09:05 GMT
From: Coates Carter <ccarter@richmond.edu>
Subject: setuid & real uid
Message-Id: <37D7CD65.3A876C8A@richmond.edu>

Is it possible to set the "real" uid that a script runs under?

A perl script can be run with the "effective" uid of another user if
that user owns the script and has pushed the setuid (04000) bit and the
$ENV variables are all ok.  However, some programs called with the
system() or the backquote method ignore the effective uid and use only
the real uid.  One example is ssh.
The example is owned by 'tom' with permissions 04555 but run by
'nobody'...

    #!/usr/local/bin/perl
    $ENV{ENV}="";
    $ENV{PATH}="/bin:/usr/local/bin";
    $me = `id`;
    print "$me\n";
    `ssh -v -l tom machine2 id`;

 ...results...
uid=60001(nobody) gid=60001(nobody) euid=101(tom)

SSH Version 1.2.26 [i386-unknown-solaris2.7], protocol version 1.5.
Standard version.  Does not use RSAREF.
machine1: Reading configuration data /etc/ssh_config
machine1: ssh_connect: getuid 60001 geteuid 0 anon 0
 ...........more ssh stderr......

Calling the system program `id` shows that my euid is what I want it to
be, but the real uid is still for 'nobody'.  The next system program
called, ssh, only cares what the real uid is.
Is it possible to set the "real" uid that a script runs under?

Coates Carter
University of Richmond
carter@richmond.edu



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

Date: Thu, 09 Sep 1999 17:27:46 GMT
From: Karl Schmidt <nospam@nospam.de>
Subject: Re: Smile...
Message-Id: <19990909.17274685@mis.configured.host>

>>>>>>>>>>>>>>>>>> Urspr=FCngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 08.09.99, 18.49.31, schrieb larske@hem1.passagen.se.REMOVE=20
(Lars-=C5ke Aspelin) zum Thema Re: Smile...:


> Good work!
> But can kou please explain whk kou changed from 'July' to 'Julik' and=

> not to 'Julk' as would be expected?   ;-)

Because I did not write that myself ;-)  I recieved this this=20
enlightening peace of prosa via email from some friend...

I just copied it without any proof reading, sorry...

--=20
*******************************************************
**** Karl Schmidt Karl_Schmidt at t-online dot de) ****
***  Java related Homepage (under construction):    ***
**     http://home.t-online.de/home/Karl_Schmidt     **
*           (new: english pages available)            *
**  New: 'Life'-Applet with options in popup menu    **
***   Message created with StarOffice 5.1 (OS/2)    ***
****            Do 09.Sep 99, 15:15:06             ****
*******************************************************





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

Date: Thu, 09 Sep 1999 15:21:45 GMT
From: Douglas Sparling <dsparling@my-deja.com>
Subject: Re: Sorry, Re: Why, why, why, -w and use strict?
Message-Id: <7r8j9n$gnh$1@nnrp1.deja.com>

In article <7r7mjr$e4p$0@216.39.133.13>,
  "Bart Simpson" <phony@nospam.com> wrote:
>
> Kragen Sitaker <kragen@dnaco.net> wrote in message
> news:BJDB3.12481$r5.818064@typ11.nn.bcandid.com...
> <snip>
> > Oh, by the way, if you post as 'phony@nospam.com', people will think
> > you're a total lame loser.
> >
>
> My ISP recommended using a phony address when posting to newsgroups
because
> he says it cuts down on spam.
>
> The only moderator that even mentioned anything about it said he
didn't mind
> the address because he could still track me down and complain to my
ISP from
> the info in the message header.
>
> I dont mind being thought of as a lame loser if it slows down the
spam some.
> And since I read the newsgroups for the replies, my email address
isn't
> needed.
>
>
Why don't you sign up for a web-based email account like the one Deja
News offers. You get access to newgroups archives as well as a separate
email address where you needn't worry about spam.
--
Douglas Sparling
Web Programmer
Universal New Media
http://www.uexpress.com


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


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

Date: Thu, 09 Sep 1999 15:24:48 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Sorry, Re: Why, why, why, -w and use strict?
Message-Id: <37d7d0a3.14773946@news.skynet.be>

Bart Simpson wrote:

>My ISP recommended using a phony address when posting to newsgroups because
>he says it cuts down on spam.

Your ISP? Let's spam the bugger! :-) <webmaster@oz.net>, is it?

-- 
	Bart.


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

Date: 9 Sep 1999 15:13:38 GMT
From: campbell-lange@easynet.co.uk (Rory C-L)
Subject: Re: Uninitialised variable in sub - debugging and avoiding?
Message-Id: <campbell-lange-0909991613500001@campbell-lange.easynet.co.uk>

In article <Arved_37-0909990643020001@dyip-21.chebucto.ns.ca>,
Arved_37@chebucto.ns.ca (Arved Sandstrom) wrote:


> If there are cases where it is reasonable to expect that one of the $n
> variables doesn't get matched, check the value to see if it's defined.

Will the debugger help?

> peruse the  CPAN to see what's available under HTML.

Mmm. The descriptions of the modules are a little cryptic.

> Strictly speaking the help you need at the moment is more along the lines
> of writing regular expressions that do what you want them to. Not being
> snarky in the slightest. Read the perlre manpage for starters.
> 
> Arved

I'll take the advice! Thanks.

I've sorted out the problem with my code (grep test line 6). Apologies for
wasting anyone's time.
However, I'd still like some debugging tips, if possible.

Thanks
Rory

1   : #!perl -w
2   : use diagnostics;
3   : 
4   : $in = q example html ;
5   : @rows = split /<\/TR>/, $in;
6   : @rows = grep { /<TD>/ && $_ !~ /AM/ } @rows;
#                 ^^^^^^
#                 I've added this check to
#                 see if there is anything useful in the lines I've got
7   : @nums = map { /(.*)<TD>(.*)/; [ htmlparse($1), htmlparse($2)] } @rows;
8   : 
9   : $count = 0;
10  : foreach $out (@nums) {
11  :    last if $count >= 5 ;
12  :    print "$out->[0] $out->[1] \n";
13  : 
14  :    ++$count;   
15  : }
16  : 
17  : sub htmlparse {
18  :    $inner = shift;
19  :    $inner =~ s/\&nbsp;//g;
20  :    $inner =~ s/<[^>]+>//g;
21  :    return $inner;
22  : }

-- 
Rory Campbell-Lange
The Campbell-Lange Workshop


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 V9 Issue 750
*************************************


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