[18233] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 401 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 2 18:15:49 2001

Date: Fri, 2 Mar 2001 15:15:22 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983574922-v10-i401@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 2 Mar 2001     Volume: 10 Number: 401

Today's topics:
        Problem with #! line using RedHat 7 mwhyte@pmds.com
    Re: Problem with #! line using RedHat 7 <tony_curtis32@yahoo.com>
    Re: Problem with #! line using RedHat 7 (Peter L. Berghold)
    Re: Problem with #! line using RedHat 7 <gtoomey@usa.net>
    Re: Problem with #! line using RedHat 7 <synapsezero@yahoo.com>
    Re: Problem with #! line using RedHat 7 <wells@cedarnet.org>
    Re: Problem with #! line using RedHat 7 <shanem@ll.mit.edu>
    Re: Problem with #! line using RedHat 7 (Rollin Thomas)
    Re: Problem with #! line using RedHat 7 (Ben Okopnik)
    Re: Problem with #! line using RedHat 7 <tony_curtis32@yahoo.com>
    Re: Problem with #! line using RedHat 7 <dwilga-MUNGE@mtholyoke.edu>
    Re: Problem with #! line using RedHat 7 (Ben Okopnik)
    Re: Problem with Regular Expression Match <iltzu@sci.invalid>
    Re: Question! (Martien Verbruggen)
    Re: use strict; (Peter L. Berghold)
    Re: use strict; (BUCK NAKED1)
    Re: use strict; <tony_curtis32@yahoo.com>
    Re: use strict; (Peter L. Berghold)
    Re: use strict; <wells@cedarnet.org>
        Verifying pgp signed message? (Ted Wart)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 2 Mar 2001 20:27:38 GMT
From: mwhyte@pmds.com
Subject: Problem with #! line using RedHat 7
Message-Id: <97ovnq$5hm$1@news.netmar.com>


I was hoping someone might help me.  I've got a very simple Hello World script
written (the script follows):

#!/usr/bin/perl -w     
                       
use strict;            
use diagnostics;       
                       
print "Hello World\n"; 

When I run "perl hello.pl", everything works fine.  I've changed the
permissions of the file hello.pl to be 777, but I am unable to run the
program by simply typing "hello".  When I do, I get this message:

bash: hello: command not found

Is there a step I'm missing?  I'm reading a freebie online course and it says
all I need to make the script itself executable is to change the permissions,
and to have the #! as the first line.  I'd appreciate any help anyone can
provide.

Thanks,

Mark

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: 02 Mar 2001 14:32:10 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <87k86729px.fsf@limey.hpcc.uh.edu>

>> On 2 Mar 2001 20:27:38 GMT,
>> mwhyte@pmds.com said:

> I was hoping someone might help me.  I've got a very
> simple Hello World script written (the script follows):

> #!/usr/bin/perl -w
                       
> use strict; use diagnostics;
                       
> print "Hello World\n";

> When I run "perl hello.pl", everything works fine.  I've
> changed the permissions of the file hello.pl to be 777,
> but I am unable to run the program by simply typing
> "hello".  When I do, I get this message:

> bash: hello: command not found

It means: perl is not in /usr/bin/perl

Do

    bash$ which perl

to find out where the perl binary is located and amend the
#! line accordingly.

hth
t
-- 
The avalanche has already started.
It is too late for the pebbles to vote.


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

Date: Fri, 02 Mar 2001 21:00:12 GMT
From: peter@uboat.berghold.net (Peter L. Berghold)
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <slrn9a02es.232.peter@uboat.berghold.net>

On 2 Mar 2001 20:27:38 GMT, mwhyte@pmds.com <mwhyte@pmds.com> wrote:
>
>
>#!/usr/bin/perl -w     
>                       
>Is there a step I'm missing?  I'm reading a freebie online course and it says

Perhaps your perl isn't in /usr/bin?  Try this:

perl -v     # If you get output your PATH is pointing to perl

type perl   # this will work if you are in bash...

if the above works you will know the path to perl. Then you just 
substitue the path to perl in your "shebang."

#!/usr/funky/path/to/perl -w 


-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           


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

Date: Sat, 3 Mar 2001 07:17:07 +1000
From: "Gregory Toomey" <gtoomey@usa.net>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <gTTn6.6844$v5.25764@newsfeeds.bigpond.com>

The most likely cause is that you current directory is not in your path.
If your file is called "script", try

 ./script

gtoomey
-------------------
<mwhyte@pmds.com> wrote in message news:97ovnq$5hm$1@news.netmar.com...
>
> I was hoping someone might help me.  I've got a very simple Hello World
script
> written (the script follows):
>
> #!/usr/bin/perl -w
>
> use strict;
> use diagnostics;
>
> print "Hello World\n";
>
> When I run "perl hello.pl", everything works fine.  I've changed the
> permissions of the file hello.pl to be 777, but I am unable to run the
> program by simply typing "hello".  When I do, I get this message:
>
> bash: hello: command not found
>
> Is there a step I'm missing?  I'm reading a freebie online course and it
says
> all I need to make the script itself executable is to change the
permissions,
> and to have the #! as the first line.  I'd appreciate any help anyone can
> provide.
>
> Thanks,
>
> Mark
>
>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
eb  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email
abuse@newsone.net




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

Date: Fri, 02 Mar 2001 07:18:11 +0000
From: synapse0 <synapsezero@yahoo.com>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <3A9F4933.B55ACBA@yahoo.com>

mwhyte@pmds.com wrote:
> 
> I was hoping someone might help me.  I've got a very simple Hello World script
> written (the script follows):
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use diagnostics;
> 
> print "Hello World\n";
> 
> When I run "perl hello.pl", everything works fine.  I've changed the
> permissions of the file hello.pl to be 777, but I am unable to run the
> program by simply typing "hello".  When I do, I get this message:
> 
> bash: hello: command not found
> 

It's cause you don't have a file called "hello" .. your script is named
"hello.pl" according to above.. so you need to type -path-/-full file
name- or, in other words 
(if you're in the same dir) "./hello.pl"
g'luck

> Is there a step I'm missing?  I'm reading a freebie online course and it says
> all I need to make the script itself executable is to change the permissions,
> and to have the #! as the first line.  I'd appreciate any help anyone can
> provide.
> 
> Thanks,
> 
> Mark
> 
>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email abuse@newsone.net



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

Date: Fri, 02 Mar 2001 14:30:02 -0600
From: Steve Wells <wells@cedarnet.org>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <3AA002CA.1E21F5EF@cedarnet.org>



Tony Curtis wrote:

 ...
> > "hello".  When I do, I get this message:
> 
> > bash: hello: command not found
> 
> It means: perl is not in /usr/bin/perl
> 
> Do
> 
>     bash$ which perl
> 
> to find out where the perl binary is located and amend the
> #! line accordingly.

or . is not in your path in which case you need to type:
"./hello.pl"
in order to run the program.

HTH,
STEVE


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

Date: Fri, 02 Mar 2001 16:46:53 -0500
From: Shane McDaniel <shanem@ll.mit.edu>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <3AA014CD.3A3BB3FB@ll.mit.edu>

try running  'hello.pl'

mwhyte@pmds.com wrote:
> 
> I was hoping someone might help me.  I've got a very simple Hello World script
> written (the script follows):
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use diagnostics;
> 
> print "Hello World\n";
> 
> When I run "perl hello.pl", everything works fine.  I've changed the
> permissions of the file hello.pl to be 777, but I am unable to run the
> program by simply typing "hello".  When I do, I get this message:
> 
> bash: hello: command not found
> 
> Is there a step I'm missing?  I'm reading a freebie online course and it says
> all I need to make the script itself executable is to change the permissions,
> and to have the #! as the first line.  I'd appreciate any help anyone can
> provide.
> 
> Thanks,
> 
> Mark
> 
>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: 2 Mar 2001 21:34:06 GMT
From: thomas@mail.nhn.ou.edu (Rollin Thomas)
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <thomas.983568846@mail.nhn.ou.edu>

"Gregory Toomey" <gtoomey@usa.net> JEOPARDY POSTED:
>The most likely cause is that you current directory is not in your path.
>If your file is called "script", try

>./script

Which is a nice sentiment, but is the THIRD WRONG ANSWER in the thread.

><mwhyte@pmds.com> wrote in message news:97ovnq$5hm$1@news.netmar.com...
>>
>> When I run "perl hello.pl", everything works fine.  I've changed the
>> permissions of the file hello.pl to be 777, but I am unable to run the
>> program by simply typing "hello".  When I do, I get this message:
>>
>> bash: hello: command not found

Of course it doesn't work.  It doesn't matter where the hell perl
is, and even if your current directory is in your path, IT WON'T
WORK UNLESS YOU TYPE IN THE NAME OF THE SCRIPT, WHICH IS

 hello.pl

AND NOT

 hello

AUUUUUUUUHGHGHHGHGHFHFHFHHHHHHHHHHHH (Croaks).
--
  Rollin C. Thomas - thomas@mail.nhn.ou.edu - www.nhn.ou.edu/~thomas
   "Promoting the ideals of a fully mechanized society since 1979."


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

Date: 2 Mar 2001 22:15:43 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <slrn9a06vf.u1j.ben-fuzzybear@Odin.Thor>

The ancient archives of 02 Mar 2001 14:32:10 -0600 showed
Tony Curtis of comp.lang.perl.misc speaking thus:
>>> On 2 Mar 2001 20:27:38 GMT,
>>> mwhyte@pmds.com said:
>
>> I was hoping someone might help me.  I've got a very
>> simple Hello World script written (the script follows):
>
>> #!/usr/bin/perl -w
>                       
>> use strict; use diagnostics;
>                       
>> print "Hello World\n";
>
>> When I run "perl hello.pl", everything works fine.  I've
>> changed the permissions of the file hello.pl to be 777,
>> but I am unable to run the program by simply typing
>> "hello".  When I do, I get this message:
>
>> bash: hello: command not found
>
>It means: perl is not in /usr/bin/perl


That's incorrect. If that was the case, the message would read

bash: hello: No such file or directory


This is a _Unix_ FAQ that a lot of DOS folks get caught by: execution in 
the local directory is _disabled_ by default as a security measure. To 
execute "hello" from the current directory, the OP needs to type

 ./hello


Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away."
 -- Antoine de Saint-Exupery


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

Date: 02 Mar 2001 16:18:00 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <87elwf24tj.fsf@limey.hpcc.uh.edu>

>> On 2 Mar 2001 22:15:43 GMT,
>> ben-fuzzybear@geocities.com (Ben Okopnik) said:

> The ancient archives of 02 Mar 2001 14:32:10 -0600
> showed Tony Curtis of comp.lang.perl.misc speaking thus:
>>>> On 2 Mar 2001 20:27:38 GMT, mwhyte@pmds.com said:
>>  I was hoping someone might help me.  I've got a very
>> simple Hello World script written (the script follows):
>> 
>> #!/usr/bin/perl -w
>> 
>> use strict; use diagnostics;
>> 
>> print "Hello World\n";
>> 
>> When I run "perl hello.pl", everything works fine.
>> I've changed the permissions of the file hello.pl to be
>> 777, but I am unable to run the program by simply
>> typing "hello".  When I do, I get this message:
>> 
>> bash: hello: command not found
>> 
>> It means: perl is not in /usr/bin/perl


> That's incorrect. If that was the case, the message
> would read

> bash: hello: No such file or directory


> This is a _Unix_ FAQ that a lot of DOS folks get caught
> by: execution in the local directory is _disabled_ by
> default as a security measure. To execute "hello" from
> the current directory, the OP needs to type

> ./hello

As someone else pointed out, the program is actually
called "hello.pl", so we're all wrong (apart from the one
who pointed it out :-)

DOH!

t
-- 
The avalanche has already started.
It is too late for the pebbles to vote.


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

Date: Fri, 02 Mar 2001 22:20:59 GMT
From: Dan Wilga <dwilga-MUNGE@mtholyoke.edu>
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <dwilga-MUNGE-A12B07.17180802032001@nap.mtholyoke.edu>

In article <87k86729px.fsf@limey.hpcc.uh.edu>,
 Tony Curtis <tony_curtis32@yahoo.com> wrote:

> > When I run "perl hello.pl", everything works fine.  I've
> > changed the permissions of the file hello.pl to be 777,
> > but I am unable to run the program by simply typing
> > "hello".  When I do, I get this message:
> 
> > bash: hello: command not found
> 
> It means: perl is not in /usr/bin/perl

Either that, or the working directory isn't in your PATH env var. Try this 
instead:

  ./hello

Or, finally, if you created the file using a Mac and saved it to the Unix box, 
it may have the wrong kind of end-of-lines.

-- 
Dan Wilga          dwilga-MUNGE@mtholyoke.edu
** Remove the -MUNGE in my address to reply **


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

Date: 2 Mar 2001 22:24:05 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: Problem with #! line using RedHat 7
Message-Id: <slrn9a07eq.u1j.ben-fuzzybear@Odin.Thor>

The ancient archives of 2 Mar 2001 21:34:06 GMT showed
Rollin Thomas of comp.lang.perl.misc speaking thus:
>"Gregory Toomey" <gtoomey@usa.net> JEOPARDY POSTED:
>>The most likely cause is that you current directory is not in your path.
>>If your file is called "script", try
>
>>./script
>
>Which is a nice sentiment, but is the THIRD WRONG ANSWER in the thread.
>
>><mwhyte@pmds.com> wrote in message news:97ovnq$5hm$1@news.netmar.com...
>>>
>>> When I run "perl hello.pl", everything works fine.  I've changed the
>>> permissions of the file hello.pl to be 777, but I am unable to run the
>>> program by simply typing "hello".  When I do, I get this message:
>>>
>>> bash: hello: command not found
>
>Of course it doesn't work.  It doesn't matter where the hell perl
>is, and even if your current directory is in your path, IT WON'T
>WORK UNLESS YOU TYPE IN THE NAME OF THE SCRIPT, WHICH IS
>
> hello.pl
>
>AND NOT
>
> hello
>
>AUUUUUUUUHGHGHHGHGHFHFHFHHHHHHHHHHHH (Croaks).


 ...which makes this the FOURTH wrong answer, by your count, since it 
_still_ will not execute.


 ./hello.pl


And it may _still_ fail to execute if the path to perl is wrong.


Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"I think animal testing is a terrible idea; they get all nervous and
 give the wrong answers."


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

Date: 2 Mar 2001 20:39:20 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Problem with Regular Expression Match
Message-Id: <983564029.21091@itz.pp.sci.fi>

In article <20010301222640.10387.qmail@web1604.mail.yahoo.com>, J Garcia wrote:
>
>(the blank lines inserted by the user in the textbox should be replaced
>with <P> which is what I am trying to do).

Fine, but you seem to be approaching the problem backwards.  The proper
procedure for this is:

 1. Replace HTML metacharacters ('<' and '&') in the user input with the
    respective entities.  This step should be omitted if you _want_ the
    users to be able to enter working HTML tags.

 2. Replace any plain-text formatting (line and paragraph breaks, etc.)
    in the input with the appropriate HTML tags.

In Perl code:

  sub text2html {
      local $_ = shift;

      s/&/&amp;/g;               # first entify ampersands..
      s/</&lt;/g;                # ..then rest of metachars

      s/[^\S\n]+\n/\n/g;         # trim trailing whitespace
      s/\n\n+/<\/p><p>/g;        # 2 x newline -> paragraph
      s/\n/<br>/g;               # lone newline -> linebreak

      return "<p>$_</p>";
  }

This version will remove all newlines from the input, yielding one long
line.  It's possible to preserve them, but the regexen get uglier.  It
might be easier to re-introduce them afterwards.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"I did, however, blame it on an 'Intermittant connection in the power cable',
 which was true, after a fashion."              -- Dave Hinz in the monastery

Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Sat, 3 Mar 2001 07:49:35 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Question!
Message-Id: <slrn9a01qv.pa0.mgjv@martien.heliotrope.home>

On Fri, 2 Mar 2001 13:59:12 -0500,
	Simon <simon@nospam.simonwebdesign.com> wrote:
> Is it possible to add the .html extension to the script mapping options in
> Perl/Apache so it is processed in the same manner as Perl scripts.

You should ask this question in a group that discusses the configuration
of web servers, maybe specifically Apache, probably somewhere in the
comp.infofystems.www.servers.* hierarchy.

Before you do that, though, try to think of a more meaningful subject to
use than 'Question!'.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
NSW, Australia                  | being a damn fool about it.


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

Date: Fri, 02 Mar 2001 19:29:45 GMT
From: peter@uboat.berghold.net (Peter L. Berghold)
Subject: Re: use strict;
Message-Id: <slrn99vt59.1qd.peter@uboat.berghold.net>

On Fri, 02 Mar 2001 11:56:57 -0700, Todd Anderson <todd@mrnoitall.com> wrote:
>I am trying to implement "use strict;

That's ambitious of you... but strict is already implemented... OH! You 
want to USE strict... sorry.. couldn't resist... ;-)


>My script is crippled when this is inserted asis. I was told that "use

Not true. I use strict in virtually all of my scripts and I have one 
family of scripts in particular that generate dynamic HTML through 
the use of templates. The templates themselves are implemented as 
pseuedo modules that get "required" in and their "new" method run to 
generate some content. 

Works fine... lasts a long time.

What in PARTICULAR are you having trouble implementing?  Remember that 
strict does have some very definite implications and RTFM'ing is a 
good thing...  



-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           


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

Date: Fri, 2 Mar 2001 13:54:39 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: use strict;
Message-Id: <7509-3A9FFA7F-9@storefull-244.iap.bryant.webtv.net>

I don't think you can use "use strict" with some modules, though... such
as CGI.pm.

--Dennis



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

Date: 02 Mar 2001 14:22:09 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: use strict;
Message-Id: <87ofvj2a6m.fsf@limey.hpcc.uh.edu>

>> On Fri, 2 Mar 2001 13:54:39 -0600 (CST),
>> dennis100@webtv.net (BUCK NAKED1) said:

> I don't think you can use "use strict" with some
> modules, though... such as CGI.pm.

Why think when you can know?

    #!/usr/bin/perl -wT
    use CGI qw(:standard);
    use strict;
    
    print header;
    print start_html(-title => 'A test');
    print h1('Hello');
    print end_html, "\n";

works fine for me.  Do I smell FUD?

hth
t
-- 
The avalanche has already started.
It is too late for the pebbles to vote.


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

Date: Fri, 02 Mar 2001 20:30:15 GMT
From: peter@uboat.berghold.net (Peter L. Berghold)
Subject: Re: use strict;
Message-Id: <slrn9a00mn.20b.peter@uboat.berghold.net>

On Fri, 2 Mar 2001 13:54:39 -0600 (CST), 
	BUCK NAKED1 <dennis100@webtv.net> wrote:
>I don't think you can use "use strict" with some modules, though... such
>as CGI.pm.
>

Then again... I do it all the time....

use CGI;
use strict;

works for me...

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           


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

Date: Fri, 02 Mar 2001 13:29:54 -0600
From: Steve Wells <wells@cedarnet.org>
Subject: Re: use strict;
Message-Id: <3A9FF4B2.19CF29D6@cedarnet.org>

Todd Anderson wrote:
> 
> I am trying to implement "use strict;
> My script is crippled when this is inserted asis. I was told that "use
> strict;" can't be used when requiring other scripts.
> Is it possible to 'use srict;' after you have required the other
> scripts?
> Thanks for your remarks...

Anything is possible (though probably not what you want).

Here's my files.pl file:
----------------------------------
$id = "hello world";
1;
----------------------------------

You could use strict and feel good about it by issuing:
-----------------------------------
#!/usr/bin/perl -w

BEGIN { require 'files.pl';
        print "$id\n" if $id; };

use strict;

exit 1;
------------------------------------

 ...but then that sort of defeats the purpose of strict :-P

Whomever told you that you can't use strict when requiring other
scripts is probably just lazy (and not in a virtuous way).

Tell us a little more about what you are trying to do and consider
providing examples.  There are issues when pulling in the variables into
your namespace after require-ing them under use strict; and that's
probably what the lazy programmer didn't reveal.

given the same files.pl file...

Your script contains:
------------------------
#!/usr/bin/perl -w
use strict;

require "files.pl";
my $id;
{ # I'm only going to use $main'id once. 
  # so we'll shut off warnings in here.
  $^W = 0;
  $id = $main'id;
}

print "$id\n";
exit 1;
------------------------

HTH,
STEVE


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

Date: Fri, 02 Mar 2001 20:34:25 GMT
From: t_wart@hotmail.com (Ted Wart)
Subject: Verifying pgp signed message?
Message-Id: <3aa00345.104027169@netnews.worldnet.att.net>

		

 Hi,

 I'm looking for code to verify a pgp signed string. I'm
 writing cgi software and have a pgp signed string with the key
 from someone. How can I simply verify the string is 
 signed. Any modules to do this? TIA, tw

---------------------------------------------------------
Ted Wart                               t_wart@hotmail.com
Government Tech. Support/AUAAC - Austin-818 extention 121
---------------------------------------------------------


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 401
**************************************


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