[8303] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1919 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 17 11:17:40 1998

Date: Tue, 17 Feb 98 08:00:47 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 17 Feb 1998     Volume: 8 Number: 1919

Today's topics:
    Re: A Pubilc Apology. lvirden@cas.org
    Re: A Pubilc Apology. lvirden@cas.org
        Alarm in win32 (Patrick)
    Re: Duplicate lines in associative array: keeping (Hunter Johnson)
        emacs??? <nosp@m.no>
    Re: emacs??? scott@softbase.com
    Re: emacs??? <rra@stanford.edu>
    Re: FAQless Forays (was: Code Example Needed) (Peter Samuelson)
    Re: Finding name of current directory in Perl <xxTony.Curtis@vcpc.univie.ac.at>
    Re: Finding name of current directory in Perl <lloyd@vwv.com>
    Re: Finding name of current directory in Perl <tchrist@mox.perl.com>
        hash data access (eichner)
    Re: hash data access <xxTony.Curtis@vcpc.univie.ac.at>
    Re: hash data access (eichner)
    Re: hash data access <xxTony.Curtis@vcpc.univie.ac.at>
    Re: How to substitue Control characters . <tchrist@mox.perl.com>
    Re: How to substitue Control characters . <jdporter@min.net>
    Re: htpasswd <mikihasa@worldnet.att.net>
        Installed Perl5.004_04 on hpux9.05 twice (cadworker)
        Is there a  GOOD Perl Tutorial Online? <heng7@tm.net.my>
    Re: Is this correct? File Locking (Peter Samuelson)
    Re: Killfile Triage <spt@cstr.ed.ac.uk>
        Perl on Win95 - "system"  not working <sb67@dial.pipex.com>
        Perl-compiler <lars@work.de>
    Re: Perl-compiler (Jim Britain)
    Re: Perl-compiler <tchrist@mox.perl.com>
    Re: print Location:   + frames?? <tchrist@mox.perl.com>
    Re: Quick Reg Expression help <dboorstein@shopcfn.com>
    Re: Quick Reg Expression help (Hunter Johnson)
    Re: Reg Exp  How Do I... (Francois Trousset)
        renaming files prob win32 <soul@explorer.com>
    Re: Running Perl <aprilk@dancris.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 17 Feb 1998 13:37:16 GMT
From: lvirden@cas.org
Subject: Re: A Pubilc Apology.
Message-Id: <6cc3qc$6k7$1@srv38s4u.cas.org>


According to Leslie Mikesell <les@MCS.COM>:
:The problem is that the way to send a copy by email in rn/trn is to
:stick the email address in the CC: header and the news posting and
:email copy are thus identical.  So you have to annoy the rest of the
:world with an extraneous comment or the email recipient by omitting
:it.  Could Larry Wall have made a mistake in the design of rn?

I haven't had rn around on disk for years, so I can't confirm, I seem to
recall a) that the Cc feature was added after Larry's influence on 
rn came to an end, b) that Trn strips out the Cc: line of outgoing Usenet
postings.

-- 
Larry W. Virden <URL:mailto:lvirden@cas.org> ICQ: 5744965
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.


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

Date: 17 Feb 1998 13:39:25 GMT
From: lvirden@cas.org
Subject: Re: A Pubilc Apology.
Message-Id: <6cc3ud$6k7$2@srv38s4u.cas.org>


According to Chip Salzenberg <chip@pobox.com>:
:According to doswald@xmission.com:
:> ... in a group such as this one where 200 new messages come in every
:> day it is easy to miss a followup.

:Then I can read any article in which I or my login name is mentioned.
:Surely similar searches serve for all practical purposes.  I don't

If a newsreader exists without this feature, folk can run on over to
<URL:http://www.reference.com/>, where you can set up a daily/weekly/monthly
job that looks for such strings and emails you a summary of the references
to your name across all newsgroups or just certain newsgroups.  If your
email reader is HTML aware, you can even link directly to the article
in question, see threads of related articles, etc.

-- 
Larry W. Virden <URL:mailto:lvirden@cas.org> ICQ: 5744965
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.


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

Date: Tue, 17 Feb 1998 17:05:32 GMT
From: 666@eudoramail.com (Patrick)
Subject: Alarm in win32
Message-Id: <6cbgha$pi1$1@news.NL.net>

This is probably answered before but i couldn't find it in dejanews
nor on the web...

A replacement function or program for Alarm() ?

btw:
Can anyone explain why win32 doesn't support Alarm anyway ?

Thanx in advance...

Patrick.



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

Date: 17 Feb 1998 13:11:30 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Re: Duplicate lines in associative array: keeping
Message-Id: <6cc2a2$dba@mailgate.lexis-nexis.com>

In article <34E8896A.C5A1957D@kinetic.com>,
Craig A. Keefner <keefner@kinetic.com> wrote:

> I read in multi-line file and want to display each line, even some
> of the lines which are duplicates. Is there a way to simply modify
> this script so that unique numbers are not assumed?

>  for $i (0..$#array) {
>   $partno[$i] = substr( $array[$i], -9 );
>   $text = substr( $array[$i], 1, -9 );
>   $text =~ s/\.*\s*$//; # strip off trailing "..."
>   $text =~ s/\'//; # strip off trailing "..."
>   $label{$partno[$i]} = $text;  # assumes unique numbers?

replace this line with something like:
    $label{$partno[$i] . $i} = $text;

> }

> use CGI;

> print $cgi->radio_group('group_name', \@partno, '-', 1, \%label);

But I don't know what this stuff does....

Hunter
--
J. Hunter Johnson        | "A little consistent wholesome modeling and
jhunterj@lexis-nexis.com |   costly servanthood are worth millions of
(937) 865-6800 x5385     |    true words harshly spoken."
Lexis-Nexis, Dayton, OH  |                               -- Ron Sider


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

Date: Tue, 17 Feb 1998 10:11:53 -0000
From: "noone" <nosp@m.no>
Subject: emacs???
Message-Id: <6cbo3j$1an$1@svr-c-01.core.theplanet.net>

I am starting to write larger programs than I have done before and it is
becoming a nightmare when I loose a } somewhere along the line, is there a
good editor that will colour them for me so I can find where I forget
things.

If there is one that checks perl syntax as it goes that would be an added
bonus, <-- dont say 'a good perl programmer does this'


Thanks




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

Date: 17 Feb 1998 12:30:03 GMT
From: scott@softbase.com
Subject: Re: emacs???
Message-Id: <6cbvsb$bvv$4@mainsrv.main.nc.us>

noone (nosp@m.no) wrote:
> I am starting to write larger programs than I have done before and it is
> becoming a nightmare when I loose a } somewhere along the line, is there a
> good editor that will colour them for me so I can find where I forget
> things.

Color is not as important as feel for this kind of thing.
Emacs automatically and rigorously indents the code, so
if you screw up a brace, when you get to the closing brace
the editor starts indenting very bizarrely. You know you
screwed up and need to go check your code.

	if ($a eq $b)
		# do something
}

When the closing brace does not line up, you know you are in
trouble and need to go looking for a finger check. You instinctively
know something is wrong because the indention quits lining up
properly.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 17 Feb 1998 05:33:30 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: emacs???
Message-Id: <m3lnva9x05.fsf@windlord.Stanford.EDU>

noone <nosp@m.no> writes:

> I am starting to write larger programs than I have done before and it is
> becoming a nightmare when I loose a } somewhere along the line, is there
> a good editor that will colour them for me so I can find where I forget
> things.

> If there is one that checks perl syntax as it goes that would be an
> added bonus, <-- dont say 'a good perl programmer does this'

Well, all of this obviously depends on what you want, what platform you're
on, and what exactly you mean by "checks Perl syntax," but I personally
use emacs 19.34 with Ilya's cperl-mode.  You can get the latter from CPAN
in authors/id/ILYAZ/cperl-mode/cperl-mode.el.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 17 Feb 1998 07:40:27 -0600
From: psamuels@sampo.REMOVETHIS.creighton.edu (Peter Samuelson)
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <6cc40b$jsj$1@sampo.creighton.edu>

[sean broderick <creepy@!domain.com>]
> on the other hand, i could not live without my macintosh, which
> satisfies my primitive needs without requiring me to learn many
> archaic utilities or spend huge amounts of money on windowing
> software...
> 
> (* just don't start with linux, i would not want to use an
> intel-architecture personal computer for *anything* *)

> i wonder how you are going to treat the macintosh when its mach kernel
> (via "yellow box" os) is released?

Ummm, Linux isn't just for Intel-architecture ... it can now (so I
hear) run on most PowerMacs and some of the old 68k's....  (Not to
mention several workstation architectures, apropos of nothing.)

-- 
Peter Samuelson
<sampo.creighton.edu ! psamuels>


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

Date: 17 Feb 1998 11:13:25 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
To: john.mcgoldrick@isocor.ie
Subject: Re: Finding name of current directory in Perl
Message-Id: <7xra52czei.fsf@beavis.vcpc.univie.ac.at>

Re: Finding name of current directory in Perl, John
<john.mcgoldrick@isocor.ie> said:

John> been able to solve it. How do I find the name of the
John> current working directory in Perl. I need to execute a

perldoc POSIX --> "getcwd"

The File::Basename module might also be of use.

John> program in another directory so before I chdir I need
John> to remember the name of the current dir, this is
John> because the current dir contains a file which needs to
John> be passed to the program I want to run.  I'd
John> appreciate any thoughts on this; is it a security
John> issue?

Depends on how critical this application is I guess.  You
could look at a chroot jail if so...

Check the perlfaq(s) and perlsec manpages for more
information about this.

hth
tony


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

Date: 17 Feb 1998 14:13:00 GMT
From: "GreyRider" <lloyd@vwv.com>
Subject: Re: Finding name of current directory in Perl
Message-Id: <01bd3bae$7d427ea0$10791fc4@finley>

#!/usr/bin/perl
$currdir=`pwd`;
print $currdir;

works for me ;)

John McGoldrick <john.mcgoldrick@isocor.ie> wrote in article
<EoInKB.L24@isocor.com>...
> Hi,
> 
>         This sounds like a simple problem but I haven't been able to
solve
> it. How do I find the name of the current working directory in Perl. I
need
> to execute a program in another directory so before I chdir I need to
> remember the name of the current dir, this is because the current dir
> contains a file which needs to be passed to the program I want to run.
>         I'd appreciate any thoughts on this; is it a security issue?
> 
> 
> John.
> 
> 
> 
> 


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

Date: 17 Feb 1998 14:32:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Finding name of current directory in Perl
Message-Id: <6cc71p$lr6$4@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]


Using another symbol of the post-documentatarian classes, Microsoft
Outlook Express 4.71.1712.3, in comp.lang.perl.misc "John McGoldrick"
<john.mcgoldrick@isocor.ie> intones:

:        This sounds like a simple problem but I haven't been able to solve
:it. How do I find the name of the current working directory in Perl. 

Did you check the manpages?

% cd /usr/src/perl/pod
% grep 'current working directory' *.pod
perlfunc.pod: 	change your current working directory, which is unaffected.)
perlmodlib.pod: get pathname of current working directory
perlsec.pod:    environment variables, umasks, current working directories, back to the
perltoc.pod:    =head2 Cwd, getcwd - get pathname of current working directory
perlxstut.pod:  ext/ if that directory exists in the current working directory.  Several files
perlxstut.pod:  for "build library") in the current working directory.  This directory will

You'l find that perltoc lists what you need.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


    Real Programmers think better when playing Adventure or Rogue.


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

Date: Tue, 17 Feb 1998 09:50:21 GMT
From: eichner@gmx.de (eichner)
Subject: hash data access
Message-Id: <34e95c82.999937@news.uni-augsburg.de>

Hi,

I've got the following structure:

$xyz =
{
  'a' => 'A',
  'b' => 'B',
};

How can I access the elements of this structure?
'a' and 'b' should be the elements of this structure, correct?

I need the data which is kept in 'a' and 'b'.

Thanks a lot for any help.

Michael



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

Date: 17 Feb 1998 11:07:46 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
To: eichner@gmx.de
Subject: Re: hash data access
Message-Id: <7xu39ycznx.fsf@beavis.vcpc.univie.ac.at>

Re: hash data access, eichner <eichner@gmx.de> said:

eichner> Hi, I've got the following structure:

eichner> $xyz = { 'a' => 'A', 'b' => 'B', };

I think you probably want:

%xyz = ( a => A, b => B, );

(don't need quotes in this simple case).

eichner> How can I access the elements of this structure?

print "$xyz{a}\n";

   ==> A

eichner> 'a' and 'b' should be the elements of this
eichner> structure, correct?

They are the keys.

map { print "Key: $_ -> $xyz{$_}\n"; } (keys %xyz);

  ==> Key: a -> A
      Key: b -> B

hth,
tony


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

Date: Tue, 17 Feb 1998 11:07:52 GMT
From: eichner@gmx.de (eichner)
Subject: Re: hash data access
Message-Id: <34ea6d99.5374127@news.uni-augsburg.de>

Hi,

the subroutine Win32::Read returns a that has the mentioned structure:

$xyz = { 'a' => 'A', 'b' => 'B', };

So, is there a possibility to access exact this data structure (hash).

Thanks for further help.

Michael



On 17 Feb 1998 11:07:46 +0100, Remove xx to reply
<xxTony.Curtis@vcpc.univie.ac.at> wrote:

>Re: hash data access, eichner <eichner@gmx.de> said:
>
>eichner> Hi, I've got the following structure:
>
>eichner> $xyz = { 'a' => 'A', 'b' => 'B', };
>
>I think you probably want:
>
>%xyz = ( a => A, b => B, );
>
>(don't need quotes in this simple case).
>
>eichner> How can I access the elements of this structure?
>
>print "$xyz{a}\n";
>
>   ==> A
>
>eichner> 'a' and 'b' should be the elements of this
>eichner> structure, correct?
>
>They are the keys.
>
>map { print "Key: $_ -> $xyz{$_}\n"; } (keys %xyz);
>
>  ==> Key: a -> A
>      Key: b -> B
>
>hth,
>tony



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

Date: 17 Feb 1998 12:19:27 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
Subject: Re: hash data access
Message-Id: <7xoh06cwcg.fsf@beavis.vcpc.univie.ac.at>

Re: hash data access, eichner <eichner@gmx.de> said:

eichner> Hi, the subroutine Win32::Read returns a that has

Well, thanks for telling us it was pre-structured from a
module...

eichner> the mentioned structure:
eichner> $xyz = { 'a' => 'A', 'b' => 'B', };

eichner> So, is there a possibility to access exact this
eichner> data structure (hash).

Use

    $xyz->{a}

usw.

man perlref too...

hth,
tony


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

Date: 17 Feb 1998 14:53:07 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to substitue Control characters .
Message-Id: <6cc88j$oi9$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, jdporter@min.net writes:
:  $CtrlZ = \026;

$CtrlZ is now a reference to 18.  I am sure you mean "\026"
in quotes.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


I have a different view of the world.  --Andrew Hume. Show&Tell '87


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

Date: Tue, 17 Feb 1998 09:40:50 -0500
From: John Porter <jdporter@min.net>
Subject: Re: How to substitue Control characters .
Message-Id: <34E9A172.1857@min.net>

Kathleen,
Mind if I ask, What's the problem you're having? You kinda imply
that something's not going as you expect; but I can't tell what
you expect or what you get.

Looks like you've got a typo in your open() call, with the quotes.

Big hint: always check the return value of open(), because if
it fails, all the following code is bogus.

I can see one thing that might not be what you want.
<IN> gives one "line" of input, which is (by default) up to the
next newline.  You should either loop over all the lines in
the file, or make the first "line" be the entire file (better,
when the file is "binary", in my opinion).

So either loop: 

  $CtrlZ = \026;
  $CtrlP = \016;
  $CtrlQ = \017;
  open (IN,"filename") || die "can't open file filename: $!\n";
  binmode (IN);
  for ( <IN> ) {
    s/$CtrlZ/ \n /g;
    s/$CtrlP/\t /g;
    s/$CtrlQ/\t/g;
    print;
  }
  close(IN);

Or schlurp entire file at once:

  $/ = undef; # read about $/
  $CtrlZ = \026;
  $CtrlP = \016;
  $CtrlQ = \017;
  open (IN,"filename") || die "can't open file filename: $!\n";
  binmode (IN);
  $_ = <IN>;
  close(IN);
  s/$CtrlZ/ \n /g;
  s/$CtrlP/\t /g;
  s/$CtrlQ/\t/g;
  print;

hth,
John Porter

Kathleen Ramsey wrote:
> 
> I have a bunch of DOS files that are one line long and have (Ctrl Z)'s (Ctrl
> P)'s and (Ctrl Q)'s.  ( they are old Office Writer Word Processor Files that
> I need to convert in to flat text)
> 
> open (IN,"filename);
> binmode (IN);
> $CtrlZ = \026 ;
> $CtrlP = \016;
> $CtrlQ = \017;
> $Line = <IN> ;
> $Line =~ s/$CtrlZ/ \n /g;
> $Line =~ s/$CtrlP/\t /g;
> $Line =~ s/$CtrlQ/\t/g;
> print $Line;
> 
> I also tried $CtrlZ = "^Z";  where ^Z is put in to the file with vi using
> Ctrl V Ctrl Z.
> 
> Any Clues will help Thanks,
> Kathy


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

Date: Tue, 17 Feb 1998 06:07:18 -0500
From: "Michael R. Harper" <mikihasa@worldnet.att.net>
To: Alexander Selkirk <nobody@nobody.com>, Luc.VanLinden@esat.kuleuven.ac.be
Subject: Re: htpasswd
Message-Id: <6cbql6$8fg@bgtnsc03.worldnet.att.net>

Alexander:

Don't forget to put expect eof at the end of your expect script.  Check my
previous post again.  It will not work without it.  Also, make sure the
 .htpasswd file exists, or else use the -c in the spawn command.

Luc:

I need to correct my original post.  I mistakenly stated:


> I believe the basic protection scheme just uses the username, a
> colon, and the uuencoded password entered on the htpasswd command line
> to create the entries in the .htpasswd file.

The above should actually read:

The .htpasswd file's entries consist of the username followed by a colon (both
in plain text) and then the encrypted (via crypt) password.  Then, during
authentication under the basic protection scheme, the information entered in the
dialog box (username and encrypted password) is concatenated with a colon
in-between and the whole string uuencoded and sent to the server for
verification against the string in the .htpasswd file.

Sorry for any confusion!

Sincerely,

Michael R. Harper


Alexander Selkirk wrote:

> Help!
>
> I am having a similar problem - for some reason even though I tried
> implementing the script as you have described, it still prompts me for a
> password...please see below.
>         For some reason I'm having trouble getting the args through from the
> perl script that drives the expect script as well - even when I
> substitute fixed values for the args I continue to get prompted for the
> password until it times out:
>
> in the perl script:
>
> 'makepass.exp $sn $passwordpref';
>
> makepass.exp:
>
> #!/usr/local/bin/expect -f
> #set sn "$argv(0)"
> set sn "888888888"
> #set passwordpref "$argv(1)"
> set passwordpref "hellothere"
> spawn htpasswd ../../../plsc172b/.htpasswd $sn
> expect {
>  "New password:" {
> #  send "$passwordpref\r"
>    send "hellothere\r"
>   exp_continue
>  }
>  "Re-type new password:" {
> #  send "$passwordpref\r"
>    send "hellothere\r"
>  }
> }





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

Date: 16 Feb 1998 08:36:04 GMT
From: 0512191990-0001@t-online.de (cadworker)
Subject: Installed Perl5.004_04 on hpux9.05 twice
Message-Id: <6c8tpk$nkf$1@news01.btx.dtag.de>

Hi

I have a problem with the @INC array.
I installes Perl5.004_04 on hpux9.05 for the first time in /opt/perl5...
than I realised the mistake. I uninstalled Perl good as I can.
Then I start a new installation in /usr/local/perl5 with new configure and
so on.
My problem, when invoking perl then @INC array includes the old
path /opt/perl5/lib.

thanks for help 
christoph



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

Date: 17 Feb 1998 14:25:59 GMT
From: "Heng Wah" <heng7@tm.net.my>
Subject: Is there a  GOOD Perl Tutorial Online?
Message-Id: <01bd3bb1$95219c60$1d13bcca@heng7.tm.net.my>

I am new to Perl.
Is there a GOOD Perl tutorial Online ?


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

Date: 17 Feb 1998 09:05:08 -0600
From: psamuels@sampo.REMOVETHIS.creighton.edu (Peter Samuelson)
Subject: Re: Is this correct? File Locking
Message-Id: <6cc8v4$juj$1@sampo.creighton.edu>

  [tchrist]
> > The problem was that when I wrote that, I didn't realize that
> > few people understood issues of stdio buffering.  So in 5.004,
> > we changed LOCK_UN so it pre-flushes.
[Chris <rebel@wantree.com.au>]
> One would assume, and obviously incorrectly so, that if your
> operating system is going to buffer a file, that it would be
> intelligent enough to include the buffer as part of that file, with
> respect to locking the file.

Umm, Tom said _stdio_ buffering.  stdio (at least as implemented in
UNIX) is part of your libc, as opposed to your kernel.  That is to say,
you may or may not be using it -- you might have your own I/O library,
or be using unbuffered I/O.  In either case, you _wouldn't_ want
flock() to implicitly fflush.

-- 
Peter Samuelson
<sampo.creighton.edu ! psamuels>


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

Date: 17 Feb 1998 09:54:36 +0000
From: Richard Caley <spt@cstr.ed.ac.uk>
Subject: Re: Killfile Triage
Message-Id: <eyhwweur1yb.fsf@liddell.cstr.ed.ac.uk>

In article <34ec65dc.4378236@news.tornado.be>, Bart Lateur (bl) writes:

bl> Because you shovel the trouble of dealing with spam, into the shoes of
bl> those people trying to send you an e-mail reply. Having to manually edit
bl> e-mail addresses, bouncing mail, you know.

Er, if someone replies without reading the message they are replying
to they get a polite reply saying what the problem is.

I get maybe a couple of email messages related to news messages a
week. I get a couple of spam messages an hour. I think asking human
mail senders to change three characters is well within the bounds of
reasonable behaviour, given that I am happy to do the same for
others. If you don't then you don't mail me and so there is no problem.

Besides, I never trusted newsreaders to get the address right even
before spam resistant addresses became common.


-- 
Mail me as rjc not spt@cstr.ed.ac.uk		_O_
						 |<



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

Date: 17 Feb 1998 14:06:48 GMT
From: "Barry Phillips" <sb67@dial.pipex.com>
Subject: Perl on Win95 - "system"  not working
Message-Id: <01bd3bad$63917520$b22a6e01@an1075-mknlho>

Can anyone help me. I am quite new to Perl. I have been using it
successfully under unix and now want to run it under win-95.

I've downloaded the latest kit which is at release PERL 5.003_7 (build
315).

I have to run some dos commands and when I pass any switches the process
hang my Pc. It looks like a bug but I cannot see any notes that suggest
this does not work.

Can anyone offer any workarounds or confirm that it does not work .

TIA

Barry Phillips


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

Date: Tue, 17 Feb 1998 12:35:48 +0100
From: Lars Werner <lars@work.de>
Subject: Perl-compiler
Message-Id: <34E97614.2EBA@work.de>

Hi, everybody,

I need a perl-compiler or a software, that i can use to transform a
perl-program to a c-program.
If you have a solution, you can send me a mail to : kloutse@hotmail.com


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

Date: Tue, 17 Feb 1998 12:26:35 GMT
From: jbritain@home.com (Jim Britain)
Subject: Re: Perl-compiler
Message-Id: <34e981f3.59577466@news>

On Tue, 17 Feb 1998 12:35:48 +0100, Lars Werner <lars@work.de> wrote:

>I need a perl-compiler or a software, that i can use to transform a
>perl-program to a c-program.
>If you have a solution, you can send me a mail to : kloutse@hotmail.com

It's called a C programmer.  There is no translator that will work.

Comment the heck out of the code -- every little detail, and a good C
programmer has a complete description of the project that will save a
hunk of time.


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

Date: 17 Feb 1998 14:25:44 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl-compiler
Message-Id: <6cc6l8$lr6$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

Using that surefire indicator of the FAQ-illiterate, Mozilla 3.03Gold
(Win95; I), poor lars@work.de writes in comp.lang.perl.misc:

:I need a perl-compiler or a software, that i can use to transform a
:perl-program to a c-program.

No, you probably don't.  But what do I know.

:If you have a solution, you can send me a mail to : kloutse@hotmail.com

If you had bothered to search the newsgroup archives, or just looked back
a few days, or if you had bothered to read the standard perl Frequently
Asked Questions list, included in the normal manpages with 5.004, you
would have found that your search was pointless.  The compiler makes
code bigger, slower, less portable, and less secure.  You don't want it.

RTFFAQ: perlfaq3

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

Let us be charitable, and call it a misleading feature  :-)
        --Larry Wall in <2609@jato.Jpl.Nasa.Gov>


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

Date: 17 Feb 1998 14:28:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: print Location:   + frames??
Message-Id: <6cc6q3$lr6$3@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, jh@spyhunter.se writes:
:Does anybody know how to link a print "Location: (URL)" to another
:frame?

I'm sorry, but I can't see the word "perl" in your statement.
You've apparently posted to the wrong news group.

Here, read these:

    The CGI Newsgroup (NOT THIS ONE):
	comp.infosystems.www.authoring.cgi

    CPAN's Web-related modules in Perl:
	http://www.perl.com/CPAN/modules/by-category/15_World_Wide_Web_HTML_HTTP_CGI/

    The Idiot's Guide to solving Perl/CGI problems 
        http://www.perl.com/perl/faq/idiots-guide.html

    Perl FAQs
        http://www.perl.com/CPAN/doc/FAQs/

    Perl Manpages (old)
        http://www.perl.com/CPAN/doc/manual/html/

    CGI FAQ
        http://www.webthing.com/page.cgi/cgifaq

    WWW Security FAQ
        www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html

    Web FAQ
        http://www.boutell.com/faq/

    HTTP Spec
        http://www.w3.org/pub/WWW/Protocols/HTTP/

    HTML Spec
        http://www.w3.org/pub/WWW/MarkUp/

    CGI Spec
        http://hoohoo.ncsa.uiuc.edu/cgi/interface.html


--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    /* we have tried to make this normal case as abnormal as possible */
            --Larry Wall in cmd.c from the perl source code


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

Date: Tue, 17 Feb 1998 07:46:49 -0500
From: Dan Boorstein <dboorstein@shopcfn.com>
Subject: Re: Quick Reg Expression help
Message-Id: <34E986B9.B2AECAEF@shopcfn.com>

Jonathan Feinberg wrote:
> 
>    If PATTERN is also omitted, splits on whitespace (after skipping
>    any leading whitespace).
> 
> "Whitespace" is not / /, it's /\s*/.  If the difference is unclear to you,

actually i believe it is more like /\s+/, except as you noted, it
skips leading whitespace. try this example:

$_ = ' test string';
print join ',', split /\s+/;
print "\n";
print join ',', split /\s*/;
print "\n";
print join ',', split;

cheers,

-- 
dan boorstein <dboorstein@shopcfn.com>


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

Date: 17 Feb 1998 13:19:33 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Re: Quick Reg Expression help
Message-Id: <6cc2p5$e59@mailgate.lexis-nexis.com>

In article <Zena_Goddess_Of_Fire-1602982130530001@magmysmac.lfc.edu>,
Mike Binkley <Zena_Goddess_Of_Fire@mindless.com> wrote:

> First of all, is there an easy way to look for a regular expression in
> addition to any characters after it in a string?

> For example, given the string:  "This is a string of characters"

> if I searched for "is", I would want back "is is a string of characters"

You can search for /is.*/.  Or look into using the $' special
variable.

> Second, I'm having some trouble splitting on white space.  I was using:

> $_=$tokens;
> @tokens = (split);

> which did exactly what I wanted it to, however when I was looking
> through one of the man pages, I saw that doing a split on / / should
> have the same effects.  So I though that:

> @tokens = split (/ /, $tokens)

Try @tokens = split (/[ \t\n]+/, tokens);

> And on an unrelated note...is there a good way to access the indices
> of an array that I'm traversing with a foreach loop?  or should I
> just use a for loop?

"Note that there is no way with foreach to tell where you are in the
list." -- old camel.

Hunter
--
J. Hunter Johnson        | "A little consistent wholesome modeling and
jhunterj@lexis-nexis.com |   costly servanthood are worth millions of
(937) 865-6800 x5385     |    true words harshly spoken."
Lexis-Nexis, Dayton, OH  |                               -- Ron Sider


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

Date: 17 Feb 1998 13:47:34 GMT
From: trs@eerie.fr (Francois Trousset)
To: djcyr@NOSPAM.connix.com
Subject: Re: Reg Exp  How Do I...
Message-Id: <6cc4dm$3rl$1@anais.eerie.fr>

In article <6c3cap$78v@beast.connix.com>,
	djcyr@NOSPAM.connix.com writes:
> This seems like a really simple problem:
> 
> How do I remove all commas from a text file, EXCEPT
> those commas where there is a space immediately after the comma?
> 
> Any help would be appreciated.
> TIA

	Hi,

	Suppose your text is in variable $text, then
	
		$text =~ s/,+([^ ])/$1/sg;
		$text =~ s/,+$//s;

	may be a solution to your problem

		Francois Trousset

		


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

Date: 17 Feb 1998 14:29:43 GMT
From: <soul@explorer.com>
Subject: renaming files prob win32
Message-Id: <6cc6sn$doe@news3.euro.net>


hi there,

has anybody experienced problems with perl's rename() func on Win32 systems.

when i upload the script to a unix server it works fine, but not so on my
development
machine.


thankyou all,


Christopher Paul.
soul@explorer.com




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

Date: Tue, 17 Feb 1998 06:54:10 -0700
From: "April Kirby" <aprilk@dancris.com>
Subject: Re: Running Perl
Message-Id: <6cc5ad$1ia$1@usenet76.supernews.com>

To test a script you go to the command line and type 'perl myfile.pl'.  You
may have to tell it where the script is if it doesn't like that.

HTH,
April




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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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". 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 1919
**************************************

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