[8185] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1803 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 4 00:09:05 1998

Date: Tue, 3 Feb 98 21:00:22 -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, 3 Feb 1998     Volume: 8 Number: 1803

Today's topics:
    Re: **SEARCH**ing for an answer (Clay Irving)
    Re: can variables be generated on the fly (Chip Salzenberg)
    Re: Curses example (Joshua J. Kugler)
    Re: Debuggin w/o shell (root)
    Re: Don't use signal handlers (was Re: Child processes) <bf8$s03c92f97$a93d2@kf8nh.apk.net>
    Re: Don't use signal handlers (was Re: Child processes) (Ilya Zakharevich)
    Re: Good Perl editors (Clay Irving)
    Re: Good Perl editors (Chris Winters)
    Re: I am female, blonde and stupid! (Abigail)
    Re: I am female, blonde and stupid! (Gabor)
    Re: I am female, blonde and stupid! (Martien Verbruggen)
    Re: Method Invocation: non-intuitive behaviour or is it (Chip Salzenberg)
    Re: Need help with editing @INC <dformosa@st.nepean.uws.edu.au>
    Re: Pattern Match Question <corky@ultranet.com>
    Re: Pattern Match Question (Martien Verbruggen)
    Re: Perl and Excel ? (Chris Winters)
        Perl Win32, Curses, and Cdk - should I even try? (Joshua J. Kugler)
    Re: recreating sed with perl (I R A Aggie)
    Re: recursive regex? (Dean Inada)
    Re: Survival Of perl <lovegod@earthling.net>
    Re: TYP21D (was: substitute...) (Martien Verbruggen)
        unix command <kelby@mplx.com>
        unix command <kelby@mplx.com>
        unix command <kelby@mplx.com>
    Re: using unix commands in perl (I R A Aggie)
    Re: warning messages (Martien Verbruggen)
    Re: White Hats and Black <bf8$s03c92f97$a93d2@kf8nh.apk.net>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 3 Feb 1998 23:02:36 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: **SEARCH**ing for an answer
Message-Id: <6b8p8s$jvt@panix.com>

In <6b8chg$79b@enews2.newsguy.com> "Mike" <vbmike@usa.net> writes:

Please read this information on how to choose a good subject for a post:
       <URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>

>Oh, help me, all mighty Perl Gods (and goddesses)...

We're sorry. They're busy right now, but if you'd like to leave your name
and number they'll get back to you after they deal with the 75,472 posters
in line ahead of you.

>I'm in need of a way to search a web site consisting of 5000+ documents in
>ONE directory. How can I do so?  

I'd probably open each file and look for whatever I'm trying to find.

>I tried using SWISH, but got an 'Out of
>Memory!' error when creating the index.  I tried Xav, and it created the
>index (a mere 13MB), but gave me a couldn't allocate enough memory error
>when attempting to search it.  I'm very open to any ideas.  It may be
>helpful to note that the documents that I'm trying to search are all
>numbered, i.e. 1001.html, 1002.html, 1003.html..... 4999.html, 5000.html.
>Can I have SWISH create, for instance, five different indexes and then merge
>them?  How can I have it build indexes for the equivilent of 1*.html,
>2*.html, etc?  Thanks for any help, or and ideas as where to continue my
>quest.

Eh? Is this a Perl question?

>Please send a copy of your reply to vbmike@usa.net

Sorry. That's not our policy.

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: Wed, 04 Feb 1998 03:37:23 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: can variables be generated on the fly
Message-Id: <6b8nsb$suj$1@cyprus.atlantic.net>

According to aml@world.std.com (Andrew M. Langmead):
>chip@mail.atlantic.net (Chip Salzenberg) writes:
>>And obtaining hard references is difficult exactly when?
>
>Well, its a little easier to turn input into a soft reference than a
>hard reference. To get the hard reference, you have to set some sort
>of mapping between string and the reference.
>
>%hash = (sub_a => \&sub_a, sub_b => \&sub_b);

Any place you would say

   $ref = $input;

Just say:

   $ref = do { no strict 'refs'; \$$input };

Yes, it's a bit tedious, but it allows you to C<use strict> for the
rest of the program, and that's definitely worth the effort.
-- 
Chip Salzenberg               - a.k.a. -                <chip@pobox.com>
 "Boy, is it ever dark."  "I hope they don't get a moonburn."  // MST3K
           ->  Ask me about Perl training and consulting  <-
    Like Perl?  Want to help out?  The Perl Institute: www.perl.org


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

Date: Wed, 04 Feb 1998 03:21:09 GMT
From: jkugler@inreach.com (Joshua J. Kugler)
Subject: Re: Curses example
Message-Id: <34d7de83.37779776@news.inreach.com>

[e-mailed and posted]

Take a look at the Cdk module on CPAN, it would simplify your
excursion with curses.

j----- k-----

On 3 Feb 1998 13:33:39 GMT, peter.edlund@capgemini.se wrote:
()
()If anyone know where I can lay my hands on a good example of using
the Curses module, I'd be happy.

I read this group. Sometimes my ISP doesn't. Please e-mail too.

Joshua J. Kugler
Computer Consultant--Web Developer
jkugler@inreach.com
http://www.cwebpages.com/jkugler
Every knee shall bow, and every tongue confess, in heaven, on earth, and under the earth, that Jesus Christ is LORD -- Count on it!



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

Date: 4 Feb 1998 02:58:13 GMT
From: plh@dew.indirect.com (root)
Subject: Re: Debuggin w/o shell
Message-Id: <6b8lg5$52b@camel15.mindspring.com>



 
Have a second script execute the first one and redirect stderr to stdout 
see what the web server ignores in reporting an error.

If you call this from the web:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<PRE>";
print `./test.cgi 2>&1`;

It then calls this script:

#!/usr/bin/perl
print "Hello"
print "End";

The output should be something like this:

syntax error in file ./test.cgi at line 4, next token "print "
Execution of ./test.cgi aborted due to compilation errors.

Of course, you could always move to a provider who provides shell access :)

Phil Hartfield
System Administration
Internet Direct, Inc (soon to be part of Mindspring Enterprises, Inc.)
Home of the GoSite Server  Our GoSite Reg and Pro include GoShell
which allow execution of perl and bash scripts, editing, etc.  For problems
with libraries and modules, I would recommend the method above, since the 
paths and binaries differ between GoShell and Web server. 


Paul Mone (pjmone@symbioticinc.com) wrote:
: Due to the elitest nature of the body of programmers who reside here, I
: am forced to both use a proper subject and be as specific as I can.
: I have a script, written in Perl, no problems with the code, no problems
: with the file attributes/permissions...so don't send me any emails.
: My dilemma is that, of course "it doesn't work", but I am curious as to
: the best ways to go about debugging when you don't have shell/telnet
: access...I can ftp or http to the domain I'm working on, no more, no
: less.  I am getting the vaguest of the vague error messages in return
: for my hard work...one of the latest is: 
: CGIwrap Error: System Error: execv() failed

: Error: No such file or directory (2)

: but this is nonsense...there is such file or directory.  Basically, I
: want to find out more specific information about whats gone
: wrong...where did it reach this error, which file is it trying to
: access?  Why the hell does my Web-hosting service not give me telnet
: access to my "virtual" server? 
: 				Yours,
: 				   Paul


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

Date: Tue, 03 Feb 98 21:57:19 -0500
From: "Brandon S. Allbery KF8NH" <bf8$s03c92f97$a93d2@kf8nh.apk.net>
Subject: Re: Don't use signal handlers (was Re: Child processes)
Message-Id: <34d7da27$16$ofn$mr2ice@speaker>

In <6b0qap$6nv$1@client2.news.psi.net>, on 02/01/98 at 03:31 AM,
   abigail@fnx.com (Abigail) said:
+-----
| If the answer is that you'd have to write C to make Perl programs work, I
| might as well stop using Perl.
+--->8

Hmph.  It's not a whole lot better situation in C.

The really annoying thing is, I understand someone (Chip?) submitted a fix ---
and it got vetoed.  *Why*?  If I want a language that handles strings and
structures well but doesn't have a clue about signals, I know where to find
Icon.  :-)

-- 
use 5.004;sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{
$_}:$_}split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!'.
"A'6\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0\@A\\N\@PB\$`")
)));bless{}}$b=(new main);map{$b->_}split(//,' Brandon S. Allbery KF8NH') # :-)



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

Date: 4 Feb 1998 04:09:11 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Don't use signal handlers (was Re: Child processes)
Message-Id: <6b8pl7$6g$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Brandon S. Allbery KF8NH
<bf8$s03c92f97$a93d2@kf8nh.apk.net>],
who wrote in article <34d7da27$16$ofn$mr2ice@speaker>:
> In <6b0qap$6nv$1@client2.news.psi.net>, on 02/01/98 at 03:31 AM,
>    abigail@fnx.com (Abigail) said:
> +-----
> | If the answer is that you'd have to write C to make Perl programs work, I
> | might as well stop using Perl.
> +--->8
> 
> Hmph.  It's not a whole lot better situation in C.
> 
> The really annoying thing is, I understand someone (Chip?) submitted a fix ---
> and it got vetoed.  *Why*?

It was discussed a lot of times here, including this thread.

   a) It would break the programs which rely on immediate delivery of signal;
   b) The speed could be improved;

(not necessarily in this order).

Ilya


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

Date: 3 Feb 1998 22:49:21 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Good Perl editors
Message-Id: <6b8og1$j54@panix.com>

In <6b7raj$2nu@bgtnsc03.worldnet.att.net> Wes Gamble <weyus@worldnet.att.net> writes:

>I am beginning to reacquaint myself with Perl and I was interested if
>there were a preferred editor(s) that people out in Perl-land use for
>coding.  I have downloaded a demo copy of Codewright, but it doesn't
>seem to have built in support for Perl right off the bat (has anyone
>created rules for Codewright to edit Perl to their satisfaction, or
>knows how that might be done).

>I am quite adept at vi, so please none of those comments - however, I'd
>like to have something that automatically indents, italicizes, etc. to
>make my code easier to scan through quickly.

>Any ideas are welcomed.

I've been trying to make a list at: 

  Perl Reference: editors
  http://reference.perl.com/query.cgi?editors

including things like the Perl language support for Codewright:

  ftp://www.premia.com/pub/es2vd108/cw40/win32/perl.zip


-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: Wed, 04 Feb 1998 04:40:43 GMT
From: cwinters@clark.net (Chris Winters)
Subject: Re: Good Perl editors
Message-Id: <34d8f0a4.17322735@news.clark.net>

<also e-mailed to clay@panix.com>

One that I didn't notice on that list was ED (www.getsoft.com)
that comes with a host of features, including support for Perl
and a whole barrel of things I haven't been able to explore yet.

For Win32 people, there's a list of Win32 editors and Perl at:

http://www.teleport.com/~gerth/CGI/Perl_Editors.html

Chris

clay@panix.com (Clay Irving) wrote:

>In <6b7raj$2nu@bgtnsc03.worldnet.att.net> Wes Gamble <weyus@worldnet.att.net> writes:
>
>>I am beginning to reacquaint myself with Perl and I was interested if
>>there were a preferred editor(s) that people out in Perl-land use for
>>coding.  I have downloaded a demo copy of Codewright, but it doesn't
>>seem to have built in support for Perl right off the bat (has anyone
>>created rules for Codewright to edit Perl to their satisfaction, or
>>knows how that might be done).
>
>>I am quite adept at vi, so please none of those comments - however, I'd
>>like to have something that automatically indents, italicizes, etc. to
>>make my code easier to scan through quickly.
>
>>Any ideas are welcomed.
>
>I've been trying to make a list at: 
>
>  Perl Reference: editors
>  http://reference.perl.com/query.cgi?editors
>
>including things like the Perl language support for Codewright:
>
>  ftp://www.premia.com/pub/es2vd108/cw40/win32/perl.zip



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

Date: 4 Feb 1998 03:08:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: I am female, blonde and stupid!
Message-Id: <6b8m2l$br6$1@client2.news.psi.net>

Joseph N. Hall (joseph@5sigma.com) wrote on 1618 September 1993 in
<URL: news:34D7CFF2.3253BB26@5sigma.com>:
++ I am male, brunette, and that is a lousy subject line.

With curls?


Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: 4 Feb 1998 03:29:58 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: I am female, blonde and stupid!
Message-Id: <slrn6dfnu4.quf.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Joseph N. Hall <joseph@5sigma.com> wrote :
# I am male, brunette, and that is a lousy subject line.
# 

I don't know, I thought it was eye catching.  Of course it had nothing
to do with what was in the body of the post. ;-)

# Kati Gaebler wrote:
# > 
# > Hello,

gabor.
--
    Q. Why is this so clumsy?
    A. The trick is to use Perl's strengths rather than its weaknesses.
        -- Larry Wall in <8225@jpl-devvax.JPL.NASA.GOV>


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

Date: 4 Feb 1998 04:26:07 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: I am female, blonde and stupid!
Message-Id: <6b8qkv$56l$4@comdyn.comdyn.com.au>

In article <6b8m2l$br6$1@client2.news.psi.net>,
	abigail@fnx.com (Abigail) writes:
> Joseph N. Hall (joseph@5sigma.com) wrote on 1618 September 1993 in
> <URL: news:34D7CFF2.3253BB26@5sigma.com>:
> ++ I am male, brunette, and that is a lousy subject line.
> 
> With curls?

A subject line with curls?

Martien


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

Date: Wed, 04 Feb 1998 03:47:20 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Method Invocation: non-intuitive behaviour or is it me?
Message-Id: <6b8ofe$t02$1@cyprus.atlantic.net>
Keywords: method, invocation, subroutine, declaration, syntax, parsing

According to pdf@morgan.ucs.mun.ca (Paul David Fardy):
>
>	$self->{$obj} = new $obj_class $obj;
>
>If I declare Container::set BEFORE Container::new, the syntax
>error disappears and the program runs as expected.

This is a known limitation of Perl's combination of function
and method parsing.

If you write this function as:

	$obj_class->new($obj)

then it will work whether or not a &new sub has been declared.
-- 
Chip Salzenberg               - a.k.a. -                <chip@pobox.com>
 "Boy, is it ever dark."  "I hope they don't get a moonburn."  // MST3K
           ->  Ask me about Perl training and consulting  <-
    Like Perl?  Want to help out?  The Perl Institute: www.perl.org


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

Date: 4 Feb 1998 03:39:40 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Need help with editing @INC
Message-Id: <886563544.323974@cabal>

In <6b7oi8$bb6$1@news.capgemini.se> peter.edlund@capgemini.se writes:

>>I can see "internet.pll" in that path but can't figure out why Perl thinks it's
>>not there...  someone suggested I edit the @INC and push the info...

>try 'unshift (@INC, "/your/directory/where/ever/it/is");'

Also try

BEGIN {unshift (@INC, "/your/directory/where/ever/it/is");}


--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Tue, 03 Feb 1998 22:04:23 -0500
From: Bob Trieger <corky@ultranet.com>
To: curt@vphos.net
Subject: Re: Pattern Match Question
Message-Id: <34D7DAB7.5DD8@ultranet.com>

Curt Cranfield wrote:

> But what I want to do is something like this - where I say what string I
> want to search on:
> $dog = "big brown";
> if (/big/$dog)  {
> }
> This does not work!!
> 
> Is it possible to do something like this? Does it even make sense?


if ($dog =~ /big/) {...} 

P.S. pick up a copy of Learning Perl, not only very educational but a
good reference.

HTH
Bob Trieger
corky@ma.ultranet.com


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

Date: 4 Feb 1998 04:19:07 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Pattern Match Question
Message-Id: <6b8q7r$56l$3@comdyn.comdyn.com.au>

In article <34D7BEFE.7FDE@vphos.net>,
	Curt Cranfield <curt@vphos.net> writes:

> How do I a pattern match without using $_ as the string being search.

Have a look at the =~ operator.

perldoc perlop

Also have a look at the section with the title: 'Regexp Quote-Like
Operators' which mentions this and a lot of other useful things.

$dog = "big brown";
if ($dog =~ /big/)
{
	# do something
}

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Wed, 04 Feb 1998 04:34:05 GMT
From: cwinters@clark.net (Chris Winters)
Subject: Re: Perl and Excel ?
Message-Id: <34d7ee83.16777298@news.clark.net>

<also e-mailed to lwest@imaginet.fr>

Use the Win32::ODBC module. (I think you can also use the
Win32::OLE module, but I have no experience with that.)

Create an ODBC data source for your spreadsheet.

Do something like the following (untested, but based on stuff at
work I've done a number of times):

use Win32::ODBC;

{
 $DSN = "MyExcelDataSource";
 $dbx = new Win32::ODBC($DSN) 
	or die "Could not connect to spreadsheet! $!";

# for some reason, Excel wants the name of the spreadsheet in
# quotes and with a $ at the end...
 $SQL = qq(SELECT * FROM "Products\$");
 $dbx->Sql($SQL);
 while ( $dbx->FetchRow() ) {
	%this_row = $dbx->DataHash();
	do what you want with the data;
 }
}

Works for me...

Chris

Leo West <lwest@imaginet.fr> wrote:

>Does anybody know about a module or any process to read a .XLS (Excel
>file) from a Perl script ?
>
>Sorry if this question is a common one, but i am quite new to Perl under
>Windows OS ..
>
>Thanks,
>
>Leo



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

Date: Wed, 04 Feb 1998 03:34:35 GMT
From: jkugler@inreach.com (Joshua J. Kugler)
Subject: Perl Win32, Curses, and Cdk - should I even try?
Message-Id: <34d7e01b.38188583@news.inreach.com>

Lateley I have taken an interest in the Curses and Cdk modules for
Perl and want to develop a database front end using them.  I would
ideally like to do this on a Linux system, but may have to break down
and use a Win32 system (Eeewww).

I know that Gurusamy Sarathy's Win32 port of Perl comes with Curses.
I also know the source code for the modified curses comes in patches.
Given that I could get gcc, dmake, etc. for Win32, is it even worth
trying?  I have to install and compile the Cdk library, and then the
Cdk perl extention.  And of course I must specify all the proper lib
and include directories.  Has anyone had any experience with this?
Are there any resources that I could go to for help on this?

Thanks for your help.

j----- k-----
who is trying to use Perl for something other than the web. :)

I read this group. Sometimes my ISP doesn't. Please e-mail too.

Joshua J. Kugler
Computer Consultant--Web Developer
jkugler@inreach.com
http://www.cwebpages.com/jkugler
Every knee shall bow, and every tongue confess, in heaven, on earth, and under the earth, that Jesus Christ is LORD -- Count on it!



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

Date: Tue, 03 Feb 1998 22:11:33 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: recreating sed with perl
Message-Id: <fl_aggie-0302982211330001@aggie.coaps.fsu.edu>

In article <34D777BE.D49CE81A@hotmail.com>, Larry D'Anna
<ldanna@hotmail.com> wrote:

+ A sed with perl RE's would be pretty nifty tho.

Perl is a superset of sed. For all intents and purposes, perl _is_ sed...
and a lot more... :)
 
+ BTW: is my news reader screwing up line wrappings? I can't
+ tell 
+ because it fixes them when it reads them back in :(

Yes...

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 4 Feb 1998 04:43:29 GMT
From: dmi@delta1.deltanet.com (Dean Inada)
Subject: Re: recursive regex?
Message-Id: <6b8rlh$m46$1@news01.deltanet.com>

In article <6b5gis$kva$1@mathserv.mps.ohio-state.edu>, Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>Adding to what Chip wrote:
>who wrote in article <eyh67my17y9.fsf@liddell.cstr.ed.ac.uk>:
>> In article <6b1o86$mt61@zinc.imation.com>, Mark Rostron (mr) writes:
>> mr> am writing a parser and would like to use regex to easily decode nested
>> mr> funcion calls - any ideas?
>> 
>> Can't be done (at least generally). 
>
>Can be done with the current Perl (though still *very* clumsy).
>
e.g.:
	$_='(1,(2,(3,(4)),(5)),(6,(7)),(8))';
	{local $^W=0;($re=$_)=~s/(\()|(\))|./$1.$2/g}
	print join"\n",/$re/;



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

Date: Tue, 03 Feb 1998 22:06:20 -0600
From: Rich Grise <lovegod@earthling.net>
Subject: Re: Survival Of perl
Message-Id: <34D7E93C.6F47@earthling.net>

OK, Sorry. Nandor was the one dispensing personal insults.
I see my mistake, can we stop the flame war?

Rich


Tom Christiansen wrote:
> 
>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, lovegod@earthling.net writes:
> :the only computer I could find
> :with web (or "net") access for less than $20,000.00 came with w95.
> 
> Linux is free.
> 
> --tom
> --
>         Tom Christiansen        tchrist@jhereg.perl.com
> 
>     "Just because you're into control doesn't mean you're in control."
>         --Larry Wall



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

Date: 4 Feb 1998 04:11:25 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: TYP21D (was: substitute...)
Message-Id: <6b8ppd$56l$2@comdyn.comdyn.com.au>

In article <EntGIs.9zM@world.std.com>,
	aml@world.std.com (Andrew M. Langmead) writes:

> Maybe we are at the point where tuturial books should start by
> teaching the "use strict" pragma, and the corresponding programming
> practices that it forces. Even if it doesn't explain _how_ it
> works. Just tell the reader "this is some boilerplate stuff that every
> script should have."
> 
> #!/usr/bin/perl -w
> 
> use strict;

Well, it is not for nothing that the perl bug list mentions as it's
first entry that 'the -w switch is not mandatory'. In my opinion the
second entry should be 'use strict is not mandatory'. It saves so much
time and trouble to use it.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.       | you come to the end; then stop.
NSW, Australia                      | 


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

Date: Tue, 3 Feb 1998 22:08:45 -0500
From: "Kelby Valenti" <kelby@mplx.com>
Subject: unix command
Message-Id: <6b8m86$sn5@aaron.hamilton.edu>

Is there any way to run a unix command from perl?  My problem is that i'm
trying to set up an dbmm password protection.  The only way that I know how
to set the passwords is by manually typing everything in at the shell.  This
can be very time consuming.  I'm going to be get the variables from the web
so i will have the username and password available.

    If anyone has any suggestion please let me know,
        Thanks,
            Kelby




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

Date: Tue, 3 Feb 1998 22:08:45 -0500
From: "Kelby Valenti" <kelby@mplx.com>
Subject: unix command
Message-Id: <6b8mak$sn6@aaron.hamilton.edu>

Is there any way to run a unix command from perl?  My problem is that i'm
trying to set up an dbmm password protection.  The only way that I know how
to set the passwords is by manually typing everything in at the shell.  This
can be very time consuming.  I'm going to be get the variables from the web
so i will have the username and password available.

    If anyone has any suggestion please let me know,
        Thanks,
            Kelby




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

Date: Tue, 3 Feb 1998 22:08:45 -0500
From: "Kelby Valenti" <kelby@mplx.com>
Subject: unix command
Message-Id: <6b8mpq$sqf@aaron.hamilton.edu>

Is there any way to run a unix command from perl?  My problem is that i'm
trying to set up an dbmm password protection.  The only way that I know how
to set the passwords is by manually typing everything in at the shell.  This
can be very time consuming.  I'm going to be get the variables from the web
so i will have the username and password available.

    If anyone has any suggestion please let me know,
        Thanks,
            Kelby




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

Date: Tue, 03 Feb 1998 22:15:12 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: using unix commands in perl
Message-Id: <fl_aggie-0302982215120001@aggie.coaps.fsu.edu>

In article <34D790C6.11C8@cs.utexas.edu>, Kimbrough Gray
<kigray@cs.utexas.edu> wrote:

+ I'm trying to copy a file from one directory to another.

+ I thought I had heard that you could type in Unix commands directly
+ into your perl code but maybe I am incorrect.

Yes, you are. Incorrect, that is...here, try this:

use File::Copy;
copy("help.html","fun/help.html");

James - one way of doing it...

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 4 Feb 1998 04:32:20 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: warning messages
Message-Id: <6b8r0k$56l$5@comdyn.comdyn.com.au>

In article <6b7s4m$qtc@news.biz.net>,
	"Michael Bezman" <mab@sycon-design.com> writes:

> When I am running perl - I am getting the following warning messages :
> warning: setlocale(LC_CTYPE, "") failed.
> warning: LC_ALL = "(null)", LC_CTYPE = "(null)", LANG = "us",
> warning: falling back to the "C" locale.

perldoc perllocale

You need to set the environment variable LANG, or if you have a broken
system, PERL_BADLANG.  read the section on this last variable in the
perllocale documentation.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Tue, 03 Feb 98 22:12:26 -0500
From: "Brandon S. Allbery KF8NH" <bf8$s03c92f97$a93d2@kf8nh.apk.net>
Subject: Re: White Hats and Black
Message-Id: <34d7dd0c$17$ofn$mr2ice@speaker>

In <6b53ve$9gg$1@monet.op.net>, on 02/02/98 at 01:40 PM,
   mocha@op.net (broadfield) said:
+-----
| this then puts the end-user in a position to desire the more-functional
| netscape. non?
| but then again... it didn't work for mosaic, did it?
+--->8

It didn't work for Mosaic because Mosaic's creator was busily pushing his
successor to Mosaic, yclept Netscape....  :-)  One could read this as "Mark
Andreeson has seen the error of his ways".

-- 
use 5.004;sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{
$_}:$_}split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!'.
"A'6\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0\@A\\N\@PB\$`")
)));bless{}}$b=(new main);map{$b->_}split(//,' Brandon S. Allbery KF8NH') # :-)



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

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

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