[16569] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3981 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 11 00:05:27 2000

Date: Thu, 10 Aug 2000 21:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <965966709-v9-i3981@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 10 Aug 2000     Volume: 9 Number: 3981

Today's topics:
    Re: 'require'd functions access main variables <ab@cd.com>
    Re: Almost there-please answer (Tim Hammerquist)
        Digest MD5 of Perl rchan@echarge.com
        Forbidden You don't have permission to access /cgi-bin/ <((>< <yamar420@my-deja.com>
    Re: Forbidden You don't have permission to access /cgi- <elephant@squirrelgroup.com>
    Re: Forbidden You don't have permission to access /cgi- (brian d foy)
    Re: GREP - type of script... <bart.lateur@skynet.be>
    Re: GREP - type of script... <elephant@squirrelgroup.com>
    Re: http get w/ authentication (Logan Shaw)
        IIS 5 and ActivePerl from ActiveState <bruce.thornbury@longairdox.com>
        Illegal seek from backticks <abaugher@adams.net>
    Re: London £30-35K Perl Programmers Required <c_barnes_ukNOc_SPAM@hotmail.com.invalid>
    Re: London £30-35K Perl Programmers Required <elephant@squirrelgroup.com>
        Newbie: can't run my test script at my Web Host <guillaume.lahitette@cwusa.com>
    Re: OT: Difference between a .cgi file and a .pl file? (Tim Hammerquist)
    Re: Perl on NT <jlinch@mediaone.net>
    Re: Problems with adding 1 <bart.lateur@skynet.be>
        Simple Argument Passing Question <kennylim@techie.com>
    Re: Sort of a sort problem. <bart.lateur@skynet.be>
        undef multiple variables <krishnasanjay@hotmail.com>
    Re: undef multiple variables <elephant@squirrelgroup.com>
    Re: undef multiple variables <lauren_smith13@hotmail.com>
    Re: undef multiple variables (Decklin Foster)
    Re: undef multiple variables <elephant@squirrelgroup.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 11 Aug 2000 02:43:43 GMT
From: "Blair Heuer" <ab@cd.com>
Subject: Re: 'require'd functions access main variables
Message-Id: <zLJk5.244$_27.10092@newsread2.prod.itd.earthlink.net>

Let's try again, shall we. :) Thanks for your patience so far.

> Do you know what 'sub load() {...}' means? See perlsub. The '()' is a
prototype
> telling perl that load doesn't take any args. If you call it as you did
you
> should get an error message. Do you? Is that the problem? Or is something
not as
> you think, or not as you're showing?

Hmmm. You know, for some reason I had always been under the assumption that
() was needed if anything was being passed to the subroutine. But how come
it does take arguments when I use that then? That's how I have always done
it and it never caused troubles in the past.

> You're not revealing enough here. I want to see how you're doing the
requires
> and what the error messages you're getting are. What isn't working
exactly, and
> how do you know? You're also showing too much; I don't need to know all
that the
> subs do, just the parts that go wrong. Fake up a test case like this:

The part that goes wrong is that it does not think any of those variables
were declared.

> (-w and 'use strict' not employed for brevity. But you *are* using them,
aren't
> you?)

Of course I am. How could I live with myself if I did not. ;)

> main:
>   require 'a.pl';
>   $global=1;
>   print_global();
> a.pl:
>   sub print_global { print "$global\n"; }
>   1;
>
> What happens?

Okay, I made a sample similar to this, to test what I was trying to do on a
smaller scale:

one.pl:
    #!/usr/bin/perl -w
    use strict;
    require( 'two.pl' );
    my $global = 'I exist!';
    &do_you_exist();
two.pl:
    #!/usr/bin/perl -w
    use strict;
    sub do_you_exist { print $global; }
    1;

I get the following error:
    Global symbol "$global" requires explicit package name at two.pl line 5.
    Compilation failed in require at one.pl line 5.

This brings up another question: I always use & with subroutines, but you
did not. Whenever I had tried to in the past, it was an error (don't ask for
code, its a simple question). So when can I use & and when can I omit it? I
am going to read the perlsub more thoroughly since I had not previously
though of my question as being a subroutine problem, but rather a require
problem.

Any ideas on what I am doing wrong now? (I tried messing with
adding/removing () and & from my one.pl/two.pl code to get it to work to no
avail.

Thanks,
Blair




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

Date: Fri, 11 Aug 2000 03:02:55 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: Almost there-please answer
Message-Id: <slrn8p6rqc.l9.tim@degree.ath.cx>

Jim_Kearman <jkearmanNO@mindspring.com> wrote:
> I uninstalled ActiveState Perl 516. When I went to reinstall I noticed that
> both IIS-related check boxes were grayed out. Could this be the reason why
> Perl is not working with PWS4?

The latest stable build of ActivePerl for Win32 is 522.  Try that one;
it worked with PWS4 for me until I abandoned Windoze en masse.

Also keep in mind that although PWS is vaguely similar to IIS, they are
not in any significant way the same. The only real similarity is ASP
support.  Depending on your system, you may have to configure ActivePerl
to work with PWS manually.  See below.

ActivePerl-specific questions, especially combined w/ Win32 servers,
would probably be better received on ActiveState's Perl-Win32-Web
mailing list.  There you'll find more specialized help and posters with
a higher average patience level.  Good luck!

-- 
-Tim Hammerquist <timmy@cpan.org>

God made the Idiot for practice, and then He made the School Board.
	-- Mark Twain


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

Date: Fri, 11 Aug 2000 03:03:49 GMT
From: rchan@echarge.com
Subject: Digest MD5 of Perl
Message-Id: <8mvqej$nqd$1@nnrp1.deja.com>

Hi!  I am a newbie to Perl.  I have problem using digest md5 with Perl.
The platform is WINNT.  The library is Active Perl 5.6.   I downloaded
Cryptix MD5 and CPAN MD5.

When I ran the makefile, it gave me the following errors:

 >        D:\Perl\bin\Perl.exe -ID:\Perl\lib -ID:\Perl\lib
>D:\Perl\lib\ExtUtils/xs
 >ubpp -noprototypes -typemap D:\Perl\lib\ExtUtils\typemap -typemap
>typemap MD5.xs
 > MD5.xsc && D:\Perl\bin\Perl.exe -ID:\Perl\lib -ID:\Perl\lib
>-MExtUtils::Comma
 >nd -e mv MD5.xsc MD5.c
 >        cl -c  -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT
>-DHAVE_DES_FCRYPT
 > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1
>-MD -DNDE
 >BUG      -DVERSION=\"1.08\"  -DXS_VERSION=\"1.08\"  -ID:\Perl\lib\CORE
>MD5.c
 >The name specified is not recognized as an
 >internal or external command, operable program or batch file.
 >NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code
>'0x1'
 >Stop.

When I executed the test.pl, I got the following error:

 >D:\temp\PerlExample\Cryptix-1.16.tar\Cryptix-1.16\Crypt-MD5>perl
>test.pl
 >Can't locate loadable object for module Crypt::MD5 in @INC (@INC
>contains: D:/Pe
 >rl/lib D:/Perl/site/lib . . .. ../lib ../../lib ../../../lib) at
>D:/Perl/lib/Dyn
 >aLoader.pm line 106
 >        DynaLoader::croak('Can\'t locate loadable object for module
>Crypt::MD5 i
 >n @INC (@IN...') called at D:/Perl/lib/DynaLoader.pm line 174
 >        DynaLoader::bootstrap('Crypt::MD5') called at test.pl line 10

and the error occured at the following statement:

>Digest::MD5->bootstrap($VERSION);

Please help!!!

Thank you very much.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 11 Aug 2000 01:46:41 GMT
From: <((>< <yamar420@my-deja.com>
Subject: Forbidden You don't have permission to access /cgi-bin/query.cgi on this server.
Message-Id: <8mvlu0$kjc$1@nnrp1.deja.com>

Hello, I am using a Sun Ultra 5 running Solaris 2.6 with Apache 1.3.9.
When I try to run a cgi script I get teh following error.

Forbidden You don't have permission to access /cgi-bin/query.cgi on
this server.

Can anyone help me with this ? I belive I have all the correct mods
loaded and am attempting to use a cgi-script with perl to access mySQL
database. IS there some kind of permissioning issue ? I just setup a
redhat apache server and cgi works fine..Thanks for any help. Yamar


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 11 Aug 2000 02:53:23 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Forbidden You don't have permission to access /cgi-bin/query.cgi on this server.
Message-Id: <MPG.13fdfdbf672a5b76989699@localhost>

<((>< <yamar420@my-deja.com> wrote ..
>Hello, I am using a Sun Ultra 5 running Solaris 2.6 with Apache 1.3.9.
>When I try to run a cgi script I get teh following error.
>
>Forbidden You don't have permission to access /cgi-bin/query.cgi on
>this server.

this is not a Perl problem .. it's a web server problem - please find an 
appropriate newsgroup in which to ask your question

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Thu, 10 Aug 2000 23:10:23 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Forbidden You don't have permission to access /cgi-bin/query.cgi on this server.
Message-Id: <brian-ya02408000R1008002310230001@news.panix.com>

[follow-ups set]

In article <8mvlu0$kjc$1@nnrp1.deja.com>, <((>< <yamar420@my-deja.com> posted:

> Forbidden You don't have permission to access /cgi-bin/query.cgi on
> this server.

> Can anyone help me with this ?

see the troubleshooting guides in the CGI Meta FAQ.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Fri, 11 Aug 2000 01:29:47 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: GREP - type of script...
Message-Id: <iml6ps82b0bit7gindg1d0k05s14kbm9u6@4ax.com>

Larry Rosler wrote:

>It is time that you took another look.  Here is an excerpt from perlrun:
>
>-i[extension]
>
>...
>
>If no extension is supplied, no backup is made and the current file is 
>overwritten.

It could be a platform thing. Last time I tried, it failed. (DOS?
Windows? ) I'll try again later...

-- 
	Bart.


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

Date: Fri, 11 Aug 2000 02:02:06 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: GREP - type of script...
Message-Id: <MPG.13fdfc03cb351cb9989697@localhost>

Larry Rosler wrote ..
>In article <8m05ps0entbl9skkba1frpdoppiu5ghhj4@4ax.com> on Thu, 10 Aug 
>2000 10:30:17 GMT, Bart Lateur <bart.lateur@skynet.be> says...
>
>...
>
>> Like I said. The command line:
>> 
>> 	perl -pi.bak -e "s/^test(?=,)/whatever/" foo.txt
>> 
>> will rename foo.txt to foo.bak, and make a new, modified version for
>> foo.txt. (On Unix, replace the quotes with single quotes.)
>> 
>> The backup is a side effect. I'm not sure about newer evolutions, but
>> last time I looked, you couldn't use the -i (modify file itself) option
>> without making a backup.
>
>It is time that you took another look.  Here is an excerpt from perlrun:
>
>-i[extension]
>
>...
>
>If no extension is supplied, no backup is made and the current file is 
>overwritten.

Bart's correct for Win32 .. in Win32 you can't supply no argument to -i 
(at least in 5.005_03) .. you get an error

  Can't do inplace edit without backup.

this error is explained in perldiag

it's a fairly simple check though because -i* will allow it to run and 
will truncate the supplied file

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: 10 Aug 2000 20:31:36 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: http get w/ authentication
Message-Id: <8mvl1o$jps$1@provolone.cs.utexas.edu>

In article <8mvh3t$h42$1@nnrp1.deja.com>,  <weiqingh@my-deja.com> wrote:
>hi there,
>
>i know many people have asked this question b4. and i tried the sample
>code in the perldoc lwpcook
>
>      use LWP::UserAgent;
>      $ua = new LWP::UserAgent;
>      $req = new HTTP::Request GET => 'http://my.yahoo.com/';
>      $req->authorization_basic('aas', 'mypassword');
>      print $ua->request($req)->as_string;
>
>i still cannot get myyahoo's page. the one i got is the login page
>instead. any ideas what i did wrong? thanx in advance.

http://my.yahoo.com/ doesn't use HTTP-level basic authentication.
Instead, it presents the user with a form in which they can type their
userid and password.  This form is submitted and the server generates a
cookie; the Yahoo! web server then uses that cookie for
authentication.

What you'll need to do instead is use LWP to fill out the form at
http://my.yahoo.com/ and receive a cookie.  Then, you can use this
cookie in your subsequent interaction with the server.

By the way, this isn't exactly a perl question...

Hope that helps.

  - Logan


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

Date: Thu, 10 Aug 2000 23:02:41 -0400
From: "Bruce Thornbury" <bruce.thornbury@longairdox.com>
Subject: IIS 5 and ActivePerl from ActiveState
Message-Id: <sp6r6fcsn4t149@corp.supernews.com>

I am using Win2K Pro and IIS 5.  All my .asp pages work unless I try and run
a perlscript.  When I try and run a perlscript it shuts down the entire
windows scripting host.  I then have to restart the IIS services before any
server side script will work.  I did this fine with NT 4.0 and IIS 4.
Anyone have any suggestions?  Thanks in advance for your help.

Bruce




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

Date: 10 Aug 2000 21:25:18 -0500
From: Aaron Baugher <abaugher@adams.net>
Subject: Illegal seek from backticks
Message-Id: <m21yzw8rg1.fsf@haruchai.adams.net>

I must be staring too hard at this one.  Here's the chunk of
code:

  my $res = `cat $base/cmyk$$.* | $base/cmyk $args`; 
  if( $res ){
    print $res;
  } else {
    print "Problem doing cmyk analysis on $$: $!";
    exit;
  }

The first line cats some files that were created earlier to
a C program of mine, that takes in raw CMYK data and does
some analysis on it, returning a few dozen bytes of text.
When I run this, $res doesn't get the result of the shell
command, and $! ends up containing "Illegal seek".

When I run the same command at a shell prompt, it runs fine.
If I change it to a system() call instead of backquotes, it
also works fine, but of course the output goes to STDOUT
instead of my variable.  I'd like to catch it so I can deal
with possible errors.  It only has a problem within the
backticks.

Strangest of all, it works fine on a machine with version
5.005_03, but has the 'illegal seek' problem under
5.005_02.  (Under 5.6, the Image::Magick->Read() function
doesn't seem to work right, so that's out for this one.)

Anyone know what's going on here?  Everything I can find
about the 'illegal seek' error talks about using the seek
command on a pipe, but I don't do any seeks at all, unless
they're being done implicitly by the backticks.


Thanks,
Aaron
-- 
abaugher@esc.pike.il.us - Coatsburg, IL, USA
Extreme Systems Consulting - http://esc.pike.il.us/
CGI, Perl, Java, and Linux/Unix Administration




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

Date: Thu, 10 Aug 2000 19:40:39 -0700
From: checker <c_barnes_ukNOc_SPAM@hotmail.com.invalid>
Subject: Re: London £30-35K Perl Programmers Required
Message-Id: <0f2ccdc6.b0b594a8@usw-ex0103-018.remarq.com>

Well Hell Gentlemen,

I think we are definitely going to have make joining HotRecruit
a legal requirement !! ;^)

If you think I'm dreaming about salaries then go on, wake me
up !!

Show me a better place to talk to quality Perl programmers than
in a Perl NewsGroup.

Keep it coming gents.

Cheers

Chris Barnes

chrisb@hotrecruit.co.uk






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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Fri, 11 Aug 2000 03:16:44 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: London £30-35K Perl Programmers Required
Message-Id: <MPG.13fe0d86b59e2ae898969b@localhost>

checker wrote ..

>Show me a better place to talk to quality Perl programmers than
>in a Perl NewsGroup.
>
>Keep it coming gents.

a suitable complaint has been forwarded to your news provider about your 
commercial posting to this newsgroup and unwillingness to comply with 
c.l.p.misc community standards

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Fri, 11 Aug 2000 01:30:01 GMT
From: Guillaume <guillaume.lahitette@cwusa.com>
Subject: Newbie: can't run my test script at my Web Host
Message-Id: <sp6lopdjn4t112@corp.supernews.com>

Hello Perl lovers,

I am new to Perl (I am a Java developer). I have been searching thru the 
FAQs and threads but am still desperate.

My Web Host created a cgi-bin directory for me. I uploaded my dummy test.pl  
(see code below) to make sure it has been created properly. I have tried a 
couple of Perl invocations but Netscape 4.7 still returns an HTTP Error 404 
Not Found when I can see test.pl using my WS_FTP client!
I posted a readme.txt file in the cgi-bin and I can access the page fine.
Is there something wrong with my script?

According to netcraft.com, my web host is running Microsoft-IIS/4.0 on NT4 
or Windows 98.

Thanks a million for your help,

Guillaume.


#!/usr/bin/perl.exe -w

print "Content-type: text/html\n\n";
print " ";
print "<HEAD><TITLE>Test Page</TITLE></HEAD>\n";
print "<HTML><BODY><B>PERL IS WORKING PROPERLY!!!</B></BODY></HTML>";


--
Posted via CNET Help.com
http://www.help.com/


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

Date: Fri, 11 Aug 2000 02:57:09 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: OT: Difference between a .cgi file and a .pl file?
Message-Id: <slrn8p6rfi.l9.tim@degree.ath.cx>

Alan J. Flavell <flavell@mail.cern.ch> wrote:
> 
> On Thu, 10 Aug 2000, Tim Hammerquist wrote:
> > Which OSes are these, I'm curious?
> 
> Well, there's the Mac.  And the Apollo was also like this, if my
> memory isn't playing tricks (although it also had some kind of
> compatibility mode with regular unix).  I don't doubt there are others
> I'm not aware of.  

Thanx.  I don't have much experience with Mac, and I haven't really
heard much about Apollo at all.  KDE on my linux box also has MIME
associations, but a file's mime type is determined by its extension
and/or the first line/few characters of the file.  How does the Mac do
this?

> > I left Win32 because of it's extension associations, 
> 
> I wasn't for a moment trying to promote the idea that anyone should
> change their OS for this specific reason...  just a an in-principle
> and otherwise throwaway remark.

My statement was actually a bit hasty.  Extension associations weren't
the only reason I switched; I used cygwin bash for the most part, so I
explorer associations were all but forgotten.  =)

I also left Windoze because I couldn't leave the box running for more
than 2 hours without it crashing.  And Apache wasn't stable.  ...I guess
I just came to prefer the unix method.  Since I've installed linux, (1
yr ago), applications have only crashed a total of 3 times, and that was
only out of my own misuse of them;  the apps NEVER brought down the rest
of the box.  Why would I go back?  =)

Thanks again for the info.  

-- 
-Tim Hammerquist <timmy@cpan.org>
The surest sign that intelligent life exists elsewhere in
the universe is that it has never tried to contact us.
	-- Bill Watterson (Calvin & Hobbes)


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

Date: Fri, 11 Aug 2000 03:37:00 GMT
From: "Jerry Linch" <jlinch@mediaone.net>
Subject: Re: Perl on NT
Message-Id: <wxKk5.2384$rd1.449583@typhoon-news1.southeast.rr.com>

I recently installed Perl on my NT server. I'm using IIS (version whatever)
and mine works fine. Have you tried executing scripts from the command line
on the server? If this works, you may just need to make sure that your
script file extensions have been associated with the appropriate
executables. You could also be running into permissions problems with your
cgi-bin directory (or wherever you're putting the scripts). I had the latter
problem. Once I fixed it, my scripts began working just fine.

Jerry

"Chris Gifford" <chris.gifford@virgin.net> wrote in message
news:Aakk5.10335$VO3.177586@news6-win.server.ntlworld.com...
> I have a NT4 Server running Apache Web Server and I cant seem to get and
> forms with cgi/perl scripts working.  Does anyone know of any scripts that
> work on NT servers for sending forms and does not require downloading
extra
> software?
>
> Chris
>
>




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

Date: Fri, 11 Aug 2000 03:26:30 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Problems with adding 1
Message-Id: <tes6pssotkg105nr2t919ahn1vq175jndq@4ax.com>

thirdgc@my-deja.com wrote:

>I am trying to open a file and raise the number by one, but instead of
>raising it one, it changes the number to one.

Ah, an access counter. Here a simple one:

	open FILE, ">>counter.file";
	print FILE, "*";

Every time, one character is added to the file. You can count visitors
by taking the length ofthe file. Hey, how many visitors were you
expecting anyway?  ;-)

-- 
	Bart.


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

Date: Fri, 11 Aug 2000 01:26:45 GMT
From: "Kenny Lim" <kennylim@techie.com>
Subject: Simple Argument Passing Question
Message-Id: <pDIk5.45$_27.2332@newsread2.prod.itd.earthlink.net>

Hi All,

I would like to be able to pass the argument (See below) in the command
prompt to run my process and are wondering is someone can provide some quick
pointers to this
problem.

(a) Target Drive  #(Works Fine!)
(b) Name of the Project (Most project are independent by itself except for
      Embarcadero_Project)

ie. Perl test1.pl - d d: -p $DBArtisan
or
ie Perl test1.pl -d d: -p $@Embarcadero_Projects


So far, I am receiving the following error message :

Can't stat @Embarcadero_Projects: No such file or directory

I am just wondering if there is a step that I am missing here, What I need
is the directory
path that resides within the arrays and not the strings.


Any advise would be appreciated as I am just a plain beginner. Thanks in
advance.

#Test script enclosed

Kenny-


#! /usr/local/bin/perl -w
use File::Copy;
use File::Find;
use Getopt::Std;

getopts( 'd:p:' );

$Target_Drive   = $opt_d ? $opt_d : "d:";
$Project_Name  = $opt_p ? $opt_p : "\@Embarcadero_Projects";

$DBArtisan   = "$Target_Drive/DBArtisan";
$RapidSQL   = "$Target_Drive/RapidSQL";
$ChangeManager = "$Target_Drive/ChangeManager";
$SharedComponents  = "$Target_Drive/SharedComponents";
$ETProject   = "$Target_Drive/ETProject";
$ETBrowsers   = "$Target_Drive/ETBrowsers";
$ETDBAExplorer  = "$Target_Drive/ETDBAExplorer";

@Embarcadero_Projects = ("$DBArtisan", "$RapidSQL","$SharedComponents",
"$ChangeManager", "$ETProject", "$ETBrowsers", "$ETDBAExplorer");

# To Test the Output value

print "Results : <$DBArtisan>\n";
print "Results : <$RapidSQL>\n";
print "Results : <$SharedComponents>\n";
print "Results : <$ETProject>\n";
print "Results : <$ETBrowsers>\n";
print "Results : <$ETDBAExplorer>\n";

print "Results : <$Target_Drive>\n";
print "Results : <@Embarcadero_Projects>\n";
print "Results : <$Project_Name>\n";
print "Results : <find (\&scan_file, $Project_Name)>\n";

find (\&scan_file, $Project_Name);

sub scan_file

{

return unless $_ =~ /\.txt$/i;
print "$_\n";

}




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

Date: Fri, 11 Aug 2000 03:30:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Sort of a sort problem.
Message-Id: <sos6ps0hjavr8ns46t8jk3aftgmm895sal@4ax.com>

Larry Rosler wrote:

>(For ultimate speed, I would pack() to a two-byte short unsigned 
>integer, instead of sprintf() to a four-byte digit string; but that is 
>irrelevant to your objections.)

In BigEndian mode. But that was obvious?

-- 
	Bart.


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

Date: Fri, 11 Aug 2000 01:32:23 GMT
From: Sanjay Krishna <krishnasanjay@hotmail.com>
Subject: undef multiple variables
Message-Id: <8mvl38$k33$1@nnrp1.deja.com>

How do I undef multiple with a single line ?

ex: undef($a, $b,$c,$d);
doesn't work. Is there an alternative ?

Thanks
Sanjay


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 11 Aug 2000 02:07:46 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: undef multiple variables
Message-Id: <MPG.13fdfd5e56ffa82989698@localhost>

Sanjay Krishna wrote ..
>How do I undef multiple with a single line ?
>
>ex: undef($a, $b,$c,$d);
>doesn't work. Is there an alternative ?

  ($a,$b,$c,$d) = ();

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Thu, 10 Aug 2000 19:03:38 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: undef multiple variables
Message-Id: <8mvmqi$i5j$1@brokaw.wa.com>


Sanjay Krishna <krishnasanjay@hotmail.com> wrote in message
news:8mvl38$k33$1@nnrp1.deja.com...
> How do I undef multiple with a single line ?
>
> ex: undef($a, $b,$c,$d);
> doesn't work. Is there an alternative ?

Use lexical variables.

See the documentation for strict:  'perldoc strict'

Also, 'perldoc -q lexical' has some nice info about lexical variables.

Lauren





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

Date: Fri, 11 Aug 2000 02:36:00 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: undef multiple variables
Message-Id: <kEJk5.15986$f_5.78408@news1.rdc1.ct.home.com>

Sanjay Krishna <krishnasanjay@hotmail.com> writes:

> ex: undef($a, $b,$c,$d);
> doesn't work. Is there an alternative ?

You can see from perldoc -f undef that you must use just 'undef', or
'undef EXPR'. Since undef is therefore expecting a scalar,
($a,$b,$c,$d) is evaluated as a comma expression, causing only $d to
be undefined.

One alternative is:

($a,$b,$c,$d) = ();

-- 
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)


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

Date: Fri, 11 Aug 2000 02:55:04 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: undef multiple variables
Message-Id: <MPG.13fe0875fbc024398969a@localhost>

Lauren Smith wrote ..
>
>Sanjay Krishna <krishnasanjay@hotmail.com> wrote in message
>news:8mvl38$k33$1@nnrp1.deja.com...
>> How do I undef multiple with a single line ?
>>
>> ex: undef($a, $b,$c,$d);
>> doesn't work. Is there an alternative ?
>
>Use lexical variables.
>
>See the documentation for strict:  'perldoc strict'

I'm not sure how that helps - or how you can deduce that $a, $b, $c and 
$d are not already lexicals

-- 
  jason -- elephant@squirrelgroup.com --


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

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


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