[13727] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1137 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 20 23:05:29 1999

Date: Wed, 20 Oct 1999 20: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: <940475109-v9-i1137@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 20 Oct 1999     Volume: 9 Number: 1137

Today's topics:
    Re: Array written to a file: Extra space inserted <lr@hpl.hp.com>
    Re: Date Addition <lr@hpl.hp.com>
    Re: Delete a line in a file (Tri Tram)
    Re: Delete a line in a file <lr@hpl.hp.com>
    Re: encryption and crypt() ? (Martin Vorlaender)
        File "cgi-lib.pl" not found in @INC? (Thomas j. Evans)
    Re: Help - Can't figure this out (Martien Verbruggen)
    Re: in need of example... <lr@hpl.hp.com>
    Re: IP address <lr@hpl.hp.com>
    Re: IP address <lr@hpl.hp.com>
        New Perl Group (WAS: Re: what is SHTML ?) (Matthew Bafford)
        NTRegSetKeySecurity <matthew.mcinerney@eds.com>
    Re: REGEXP rewind, backreference? <rmcilhar@!nospam!uswest.net>
    Re: Stripping ^M's from files under NT: Foolish Waste o <lr@hpl.hp.com>
        subroutine rancorr@hotmail.com
    Re: subroutine <lr@hpl.hp.com>
    Re: Substitution (Tad McClellan)
    Re: Substitution (Peter J. Kernan)
        Unix code to perl <abdoulaye.fofana@compaq.com>
    Re: Unix code to perl <vincent.murphy@cybertrust.gte.com>
        Wall Street E-Commerce <kipbrak@my-deja.com>
    Re: Wall Street E-Commerce <lr@hpl.hp.com>
    Re: what is SHTML ? <me@toao.net>
    Re: WIN .EXE files from PERL <sjoseph7@worldnet.att.net>
        Win98, PWS4, ActivePerl - Help with Paths <uttyler@hotmail.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 20 Oct 1999 17:22:23 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Array written to a file: Extra space inserted
Message-Id: <MPG.1277fc945f8d879a98a0df@nntp.hpl.hp.com>

In article <7ul9t9$8v5$1@nnrp02.primenet.com> on 20 Oct 1999 20:49:45 
GMT, Jim Monty <monty@primenet.com> says...
> etm001@yahoo.com wrote:
> > I have a simple statement:
> >
> > print INFILE "@array";
> >
> > Each element of the array is a string of comma seperated values. When
> > written to the file, all elements of the array, *excluding* the first
> > one, are having a space inserted infront of them. [...]
> 
> The default value of the list separator variable $" is a single
> space. Try changing it to a null string:
> 
>     $" = '';

Doesn't it seem more -- what shall we say -- 'natural' to just leave off 
the double-quotes? 

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


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

Date: Wed, 20 Oct 1999 18:54:44 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Date Addition
Message-Id: <MPG.1278123dbe3ce79398a0e1@nntp.hpl.hp.com>

In article <7ulhu8$ts1$1@nnrp1.deja.com> on Wed, 20 Oct 1999 23:06:57 
GMT, bagpus@my-deja.com <bagpus@my-deja.com> says...
> I need to be able to add an offset to the current date and store the
> result in a string with the format YYYYMMDDHHMMSS. I can get the
> current date into the required format but I don't know how to add the
> offset which will be in seconds to the date and be sure that the date
> is incremented correctly taking care of leap years etc.
> 
> I'm sure there is a simple way of doing this! Does anybody know how to
> do this? Will you tell me?

Yes.  You have already received two 'simple' ways that invoke the 
ponderous Date:: modules.  Here's a simple way that uses no modules.

    my ($sec, $min, $hour, $day, $mon, $year) =
        localtime $offset + time;

    sprintf '%d' . '%.2d' x 5 =>
        1900 + $year, $mon + 1, $day, $hour, $min, $sec;

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


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

Date: Thu, 21 Oct 1999 00:53:14 GMT
From: tram@olympic.seas.ucla.edu (Tri Tram)
Subject: Re: Delete a line in a file
Message-Id: <FJxH4q.9p3@seas.ucla.edu>

read that file in line by line, output it line by line exclude the line that
you don't want in the output.

Gaetan (gaetan@eii.fr) wrote:
> What can i do to delete just one line in a file.


--
-----------------------------------------------------------------
Tri Tram, Computer Science and Engineering at UCLA
http://www.seas.ucla.edu/~tram


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

Date: Wed, 20 Oct 1999 19:08:43 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Delete a line in a file
Message-Id: <MPG.12781582b32cee8098a0e3@nntp.hpl.hp.com>

In article <FJxH4q.9p3@seas.ucla.edu> on Thu, 21 Oct 1999 00:53:14 GMT, 
Tri Tram <tram@olympic.seas.ucla.edu> says...
> read that file in line by line, output it line by line exclude the line that
> you don't want in the output.
> 
> Gaetan (gaetan@eii.fr) wrote:
> > What can i do to delete just one line in a file.

perlfaq5: "How do I change one line in a file/delete a line in a 
file/insert a line in the middle of a file/append to the beginning of a 
file?"

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


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

Date: Thu, 21 Oct 1999 04:55:12 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: encryption and crypt() ?
Message-Id: <380e8090.524144494f47414741@radiogaga.harz.de>

Tom Phoenix (rootbeer@redcat.com) wrote:
: On Tue, 19 Oct 1999, Martin Vorlaender wrote:
: > :     use Crypt::UnixCrypt qw/ force_crypt /;	# imports always
: > :
: > : force_crypt? override_crypt? import_crypt? I don't know what's best....
: > 
: > This should be an export tag, right? If it isn't: how do you get crypt
: > onto the export list when 'force_crypt' (or whatever) is on it?
:
: I'm thinking that you'd have a custom import routine which strips out
: force_crypt if it sees it and passes any other args to SUPER::import.

I feared you would say that :-)

: > My suggestion would be ':override_builtin' (the 'crypt' part is mentioned
: > two times in the module name already).
:
: Okay, if you decide to implement it.... But maybe this is too much work.

No, it isn't. I've wanted for a long time look under the hood of the Exporter.
It'll just take a little longer.

: Maybe the rule should be: import only when the built-in isn't implemented.
: Anyone who wants the other can call &Crypt::UnixCrypt::crypt (or alias
: that to their favorite shorter name).

Yup - for now.

: > I've renamed the variable to set always-import mode to OVERRIDE_BUILTIN
: > already. But this isn't that elegant:
: > 
: > BEGIN { $Crypt::UnixCrypt::OVERRIDE_BUILTIN=1 }
: > use Crypt::UnixCrypt;
:
: Yes, that's why we might want that override_builtin tag. But how often
: will anyone do that? 

Not likely very often. Perhaps this unelegant method is good enough for v1.0?

Anyway, if anyone would critique the current implementation: I've put it into
http://www.pdv-systeme.de/users/martinv/Crypt-UnixCrypt-1.0.tar.gz
(7972 bytes).

cu,
  Martin
--
                       |  Martin Vorlaender  |  VMS & WNT programmer
  OpenVMS: When you    |  work: mv@pdv-systeme.de
  KNOW where you want  |        http://www.pdv-systeme.de/users/martinv/
  to go today.         |  home: martin@radiogaga.harz.de


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

Date: Thu, 21 Oct 1999 02:01:23 GMT
From: thomas@skyweb.net (Thomas j. Evans)
Subject: File "cgi-lib.pl" not found in @INC?
Message-Id: <380e7252.354780@news.skyweb.net>

Hello.

I have this Perl program that requires cgi-lib.pl, and keeps giving me
a message saying:
File "cgi-lib.pl" not found in @INC at line 12......

cgi-lib.pl does exist in the same directory as the Perl script that is
getting the error, and permissions are set correctly.  The failing
script starts out like this:

<shnips>

################
# Comment Comment #
# Blah blah blah         #
################
# More comments
#
#
#
#
#
#
require "cgi-lib.pl";
&ReadParse;

<shnaps>

As you can see, line 12 that the error points to is the require line.
I don't remember seeing anything about "@INC" before.  What is that?
Any ideas about the error?

Thanks,
-Tom


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

Date: Thu, 21 Oct 1999 00:33:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Help - Can't figure this out
Message-Id: <IbtP3.165$Vy1.3817@nsw.nnrp.telstra.net>

On Wed, 20 Oct 1999 17:19:27 -0400,
	Elaine -HFB- Ashton <elaine@chaos.wustl.edu> wrote:
> Jonathan Stowe wrote:
> > > somebody in here is a bitch and a half...
> > 
> > I think Abigail might have overestimated on the 'teenage' attitude ...
> 
> Often, too often, when a female of the species threatens the male of the
> species, she is deemed 'bitch' regardless of age or maturity level.

Are you sure 'maturity level' has nothing to do with it? I have really
never heard anyone who I regard as mature use that word. Having no
pimples anymore doesn't make one mature.

Porsche
Jetski
Phwoooah (or however it is officially spelled in the Oxford)

Q.E.D.

>                                                                     It
> is a word used too casually I think.

Unless you actually breed dogs.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Can't say that it is, 'cause it
Commercial Dynamics Pty. Ltd.   | ain't.
NSW, Australia                  | 


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

Date: Wed, 20 Oct 1999 17:19:10 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: in need of example...
Message-Id: <MPG.1277fbd45b8a795598a0de@nntp.hpl.hp.com>

In article <7ul91q$3td$2@internal-news.uu.net> on 20 Oct 1999 20:35:06 
GMT, Erik van Roode <newsposter@cthulhu.demon.nl> says...
> Jeremiah Stanley <miah@idcomm.com> wrote:
> > Can anyone send me in the direction of a good example of listing and sorting
> > directories under Linux? I need to have a way to sort out .gif's and .jpg's
> > into an array and then output the list into HTML. I have the HTML part done,
> > but how do I do an 'ls' into an array so that I can sort it? So far all I
> > have done is wear out my harddrive and gotten frustrated! :)
> 
> Check out the opendir, the grep, and the sort functions.

Don't forget the readdir function, which is the one that does the heavy 
lifting!  :-)

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


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

Date: Wed, 20 Oct 1999 16:59:32 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: IP address
Message-Id: <MPG.1277f739f57b9da698a0dc@nntp.hpl.hp.com>

In article <7ul7pd$afd$1@gellyfish.btinternet.com> on 20 Oct 1999 
20:13:33 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Wed, 20 Oct 1999 10:09:08 -0700 Larry Rosler wrote:
> > In article <7ukoid$bgs$1@nnrp1.deja.com> on Wed, 20 Oct 1999 15:53:55 
> > GMT, hakanogren@my-deja.com <hakanogren@my-deja.com> says...
> >> I would like to know how I can get the IP number from the machine where
> >> the script is running.
> > 
> > I assume you mean that the program is being run by a server.
> > 
> > Dump the list of environment variables.  Some servers set 
> > $ENV{LOCAL_ADDR} as an IP address.  Most servers set $ENV{SERVER_NAME} 
> > as a domain name, which you can resolve using gethostbyname().
> > 
> > As a last resort, many systems have a `hostname` command, whose results 
> > you can resolve also.
> 
> Larry, Larry, Larry :
> 
> perlfaq9:
> 
>  =head2 How do I find out my hostname/domainname/IP address?
> 
> Back to the Old Grouch School for you matey ;-}

Hardly.  That FAQ (which admittedly didn't enter my Old Grouch head) 
doesn't suggest using the environment variables set by a server, because 
HTTP servers are personae non gratae (off-limits) for the FAQs!

But it does deal better than I did with the hostname fallback.

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


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

Date: Wed, 20 Oct 1999 17:02:55 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: IP address
Message-Id: <MPG.1277f808645ccfae98a0dd@nntp.hpl.hp.com>

In article <eWrP3.18706$Jp4.29471@news20.bellglobal.com> on Wed, 20 Oct 
1999 23:06:50 GMT, ling <link@nowhere.org> says...
> Sorry.
> I meant :
> print server_name();

I assume you mean a function from the CGI module.  For the life of me, I 
can't figure out why anyone would want to call such a function, instead 
of using $ENV{SERVER_NAME} (as I posted).  There are functions for many 
of the environment variables.  Why the hell did Lincoln Stein bother 
with them?

Of course, that gives a domain name, not an IP address as requested.

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


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

Date: Thu, 21 Oct 1999 02:29:14 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: New Perl Group (WAS: Re: what is SHTML ?)
Message-Id: <slrn80stal.15u.*@dragons.duesouth.net>

'what is SHTML ?' posted by Graham W. Boyes <me@toao.net>, on Thu, 21
Oct 1999 01:57:54 GMT from the 'who-cares-if-it-is-ontopic' dept: 
: How about this:
: Comp.lang.perl.newbie.newbie.newbie.newbie.newbie?!

Or:

comp.lang.perl.I.cant.search.the.newsgroup.to.find.out.if.a.subject.has.been.discussed.before

This has been discussed, to death, multiple times.

In fact, if you move fast, I believe you'll find another thread with this
same subject going on right now.

: Graham W. Boyes

--Matthew


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

Date: Thu, 21 Oct 1999 09:52:48 +1000
From: "Matthew McInerney" <matthew.mcinerney@eds.com>
Subject: NTRegSetKeySecurity
Message-Id: <7ulkn1$rph$1@news.ses.cio.eds.com>

Hi

Does anyone know of any sample code or how to correctly fill the values that
the NTRegSetKeySecurity routine uses.

Thanks
Matt McInerney




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

Date: Wed, 20 Oct 1999 22:17:39 -0500
From: Rob <rmcilhar@!nospam!uswest.net>
Subject: Re: REGEXP rewind, backreference?
Message-Id: <aovP3.321$r8.13726@news.uswest.net>



Web Research wrote:
> 
> $pagelines =~
> s/(\;.*?)(SELECT)(.*?)(\'\s*||\s+)WHERE(.*?sIsolation.*?\;)/$1\' \+
> DM1\.TriDef1\.sNoLock \+ \'WHERE$2/sg;
> 
> The snippet above (in conjunction with file slurp) looks at Delphi Source
> code and makes replacements to erroneous SQL statements contained in it. It
> seems to be skipping lines or running amok across multiple lines ignoring
> the ; ; start and end characters until it can resolve the regexp. I want it
> to 'stick' to distinct lines of code.
> 
> Delphi lines of code end in ; just as perl does and can span multiple lines.
> 
> The problem seems to be that there are occurances where .*? near the
> semicolon seems to take a ; into account with it and not stick to one
> complete line of code. Either that, or the first semicolon makes the regexp
> skip a line on its next pass. I'm betting on the latter.
>

   The .* is greedy so it matches as much as it can until the regexp
doesn't match any more. So it is probably gobbling up the ; when you 
don't want it to. The other uses of .* could be gobbling up 
other things as well. Try using ([^;]*); in place of the .*?\; It will
ensure that you don't overrun the semi-colon. I also think the first 
semi-colon is skipping the next line on its next pass. Remove the first
semi-colon. The following skips shows how your regexp will siip things.

$arf = '|arf|barf|foo|bar|blah|';
$arf =~ s/\|(\w+)\|/\|MATCHED$1\|/g;

$arf should be '|MATCHEDarf|barf|MATCHEDfoo|bar|MATCHEDblah|'

Removing a pipe from the regexp will place MATCHED in front of all of
the pipe delimited words.

   Also instead of slurping the file into a single string you could set
the
input record separator variable($/) to ';' instead of '\n'. That way you
could do a while($line = <INFILE>) and $line would always have a line of
DELPHI code
and not just a line of text. This might make it easier to do your
regexp.

 
> I'm not sure if I need to add an operator with the .*? to say any character
> except for ; followed by ;, or rewind on the next pass. I'm thinking rewind
> and have found some info on 'backreferencing' but am unsure how this
> applies.
> 
> Rusman

--Rob.


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

Date: Wed, 20 Oct 1999 18:39:28 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Stripping ^M's from files under NT: Foolish Waste of Time?
Message-Id: <MPG.12780eac9b18f64198a0e0@nntp.hpl.hp.com>

In article <380e46aa$0$203@nntp1.ba.best.com> on 20 Oct 1999 22:48:10 
GMT, Josh Geller <dclxvi@best.com> says...

 ...

> But what I'd like to do is strip the ^M's before I make the tar
> file. This would have to happen on NT.
> 
> So I wrote this little thing that looks like this:
> 
> foreach $file (@ARGV) {
>     $pork = $file;

Not kosher.  This variable is set, but not used.

>     open(FILE, "<$file");

This open() is not checked for success.

>     @file = <FILE>;

The whole file is read into memory for no reason whatever.

>     close(FILE);
>     $newfile = "$file" . ".new";
>     open(NEWFILE, ">$newfile");

This open() is not checked for success.

>     foreach $line (@file) {
> 	chomp $line;

That gets rid of the "\012".

> 	print NEWFILE $line, "\015";

That replaces it by "\015".  Not what you want to happen!

>     }
> }
> 
> I guess I was under the impression that \015 would be the normal ASCII
> \n like is used under any normal, decent, operating system. Have I
> lost my mind?

Yes.  "\012" would be the normal ASCII "\n" and it is, internally, on 
Windows/DOS or Unix systems.

> Anyway, this didn't work. It takes the newlines off, sure enough. But
> When I look at the file on a unix host, the damned ^M's are still
> there, except mixed up in in the middle of the lines.
> 
> So the question is, how can I convert these files to regular unixlike
> newlines while they are still on the NT box, before I tar them up and
> ship them off to the user?

Read the files in as text files, write them out as binary files.  Then 
the internal "\n" will appear as an external "\012", not as the 
Windows/DOS line terminator "\015\012".

      open FILE, $file or
          die "Couldn't open '$file'. $!\n";
      open NEWFILE, ">$file.new" or
          die "Couldn't open '$file.new'. $!\n";
      binmode NEWFILE;
      print NEWFILE while <FILE>;

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


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

Date: Thu, 21 Oct 1999 01:50:23 GMT
From: rancorr@hotmail.com
Subject: subroutine
Message-Id: <7ulrgq$4gu$1@nnrp1.deja.com>

how do i get a subroutine to return a string?  the result i get from
the subroutine is always a scalar.


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


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

Date: Wed, 20 Oct 1999 19:20:17 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: subroutine
Message-Id: <MPG.1278183af2473dd998a0e4@nntp.hpl.hp.com>

In article <7ulrgq$4gu$1@nnrp1.deja.com> on Thu, 21 Oct 1999 01:50:23 
GMT, rancorr@hotmail.com <rancorr@hotmail.com> says...
> how do i get a subroutine to return a string?  the result i get from
> the subroutine is always a scalar.

A string is a scalar.  What are you really asking?  Can you show some 
code?

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


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

Date: Wed, 20 Oct 1999 17:07:08 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Substitution
Message-Id: <stalu7.ere.ln@magna.metronet.com>

brian d foy (brian@smithrenaud.com) wrote:
: In article <s0s8lirrr0154@corp.supernews.com>, cberry@cinenet.net (Craig Berry) wrote:

: >Randal L. Schwartz (merlyn@stonehenge.com) wrote:

: >:       s/\n/<p>/g for @plan;
: >
: >With trepidation, I correct Randal:  The @plan array in the original post
: >was populated via list-context <> with $/ set to its default value.

: in that case, 

:    chomp(@plan);


   Uhhh, yeah. But where are the <p> tags?

   heh, heh.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 21 Oct 1999 02:24:23 GMT
From: pete@theory2.phys.cwru.edu (Peter J. Kernan)
Subject: Re: Substitution
Message-Id: <slrn80suan.dh0.pete@theory2.phys.cwru.edu>

On Wed, 20 Oct 1999 16:21:35 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
 .=In article <7ul8f9$afh$1@gellyfish.btinternet.com> on 20 Oct 1999 
 .=20:25:13 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
 .=> On 20 Oct 1999 11:55:59 GMT oliver.cookYTTFIT@ukonline.co.uk wrote:
 .=> > That means changing \n for <p> and changing *text* to <b>text</b>.
 .=> > 
 ...
 .=> print "<PRE>\n",<PLAN>,"</PRE>\n";
 .=
  not bad, but wrong hole.

 .=     print <PLAN>;
 .=
and the browser should DWIM? w/the <p>'s in this becomes

print map {s/$/<p>/;$_} <PLAN>;

-- 
  Pete


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

Date: Wed, 20 Oct 1999 18:08:05 -0700
From: Abdoulaye Fofana <abdoulaye.fofana@compaq.com>
Subject: Unix code to perl
Message-Id: <380E6775.76991EEA@compaq.com>

> Is there a way to rewite this Perl/UNIX code  strictly in perl.

Thanks in advance

 @all_file = ("file1", "file2", "file3", "file4" );foreach  ( 'egrep -l
'$pattern'  @all_file` )
  {
       print  "$_\n";
   }


--
Abdoulaye Fofana
Compaq Computers
Email:   abdoulaye.fofana@compaq.com
Tel:     408-285-2174
Fax:     408-285-6230





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

Date: Thu, 21 Oct 1999 01:43:21 GMT
From: Vincent Murphy <vincent.murphy@cybertrust.gte.com>
Subject: Re: Unix code to perl
Message-Id: <xjg1zap8p54.fsf@gamora.ndhm.gtegsc.com>

>>>>> "Abdoulaye" == Abdoulaye Fofana <abdoulaye.fofana@compaq.com> writes:

    >> Is there a way to rewite this Perl/UNIX code  strictly in perl.
    Abdoulaye> Thanks in advance

    Abdoulaye>  @all_file = ("file1", "file2", "file3", "file4" );foreach  ( 'egrep -l
    Abdoulaye> '$pattern'  @all_file` )
    Abdoulaye>   {
    Abdoulaye>        print  "$_\n";
    Abdoulaye>    }

perl -nle '$/="";if (/pattern/) { print $ARGV; next}' *.pl

--Vinny


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

Date: Thu, 21 Oct 1999 00:51:27 GMT
From: TODD MURRAY <kipbrak@my-deja.com>
Subject: Wall Street E-Commerce
Message-Id: <7ulo2a$23l$1@nnrp1.deja.com>

We have all heard the rumours of the largest most prestigious Wall
Street Brokerage Houses pursuing on-line trading.  Well the time has
arrived!!

I am working with the largest Wall Street Brokerage House and Investment
Bank in staffing their projects, with the BEST JAVA, and Web Development
Talent in the country. Money is not the issue, it is the talent that
Wall Street is short of.  The difficulty is that there is a huge
shortage of e-commerce talent in the Financial Sector here in New York
City.

Please help me!!!!
I need to speak with the Guru's who are ready to accept this challenge
both technically and financially.  If you are not interested please
refer to those who are.

I am sincerely sorry to those who are not interested, but this is the
only way I can get to you who are.  Thanks for your understanding.

--
TODD MURRAY
TECHNICAL RECRUITER
(212) 971-0958

--
TODD MURRAY
TECHNICAL RECRUITER
(212) 971-0958


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


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

Date: Wed, 20 Oct 1999 19:06:28 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Wall Street E-Commerce
Message-Id: <MPG.12781503775aac5898a0e2@nntp.hpl.hp.com>

In article <7ulo2a$23l$1@nnrp1.deja.com> on Thu, 21 Oct 1999 00:51:27 
GMT, TODD MURRAY <kipbrak@my-deja.com> says...

 ...

> Bank in staffing their projects, with the BEST JAVA, and Web Development
                                            ^^^^^^^^^
You shout at us.

> Please help me!!!!

You throw around four bangs at a time.

> I need to speak with the Guru's who are ready to accept this challenge
                               ^
You don't know the difference between plurals and possessives.

> I am sincerely sorry to those who are not interested, but this is the
> only way I can get to you who are.  Thanks for your understanding.

You post total irrelevance to a Perl newsgroup, and expect our 
understanding!

> --
> TODD MURRAY
> TECHNICAL RECRUITER
> (212) 971-0958
> 
> --
> TODD MURRAY
> TECHNICAL RECRUITER
> (212) 971-0958

You include your signature twice, and without a proper sigdash either 
time.

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

You can't even invest in a decent ISP.

Please go away and never come back here! 

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


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

Date: Thu, 21 Oct 1999 01:57:54 GMT
From: Graham W. Boyes <me@toao.net>
Subject: Re: what is SHTML ?
Message-Id: <7ulrus$4rp$1@nnrp1.deja.com>

How about this:
Comp.lang.perl.newbie.newbie.newbie.newbie.newbie?!

Look, strange as it may seem, some of us *aren't* experts in Perl!  We
are learning the language and we find it difficult!  If you folks
who *are* experts can't handle answering simple questions, then *DON'T!*

Graham W. Boyes

--
"The One and Only"
me AT toao DOT net ~ http://www.toao.net


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


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

Date: Wed, 20 Oct 1999 17:15:30 -0700
From: Santosh Joseph <sjoseph7@worldnet.att.net>
Subject: Re: WIN .EXE files from PERL
Message-Id: <380E5B22.DE275D2@worldnet.att.net>


You need to get perl2exe or go to activestate.com get their perl
development kit.

Brad Wallace wrote:

> Hello,
>
> How do I take a PERL script and turn it in to a .exe file for windows?
>
> Brad



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

Date: Wed, 20 Oct 1999 18:25:51 -0600
From: "Tyler M." <uttyler@hotmail.com>
Subject: Win98, PWS4, ActivePerl - Help with Paths
Message-Id: <7ulmiq$e89$1@news.xmission.com>

I know I should be looking harder for the answer, and I am sure this proves
I am new to Perl.

I have Win98se, PWS 4.0, with ActivePerl 5.21e
I modified the registry for both .cgi and .pl with c:\perl\bin\perl.exe %s
%s
The cgi-bin has been set to allow for read, write, and script

I enter in my webpage which is Http://localhost/cgi-bin/vote.cgi

I get this message everytime, reguardless of the cgi program or script, as I
have a few I want to try out.

---Error Message---
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:


Can't open perl script "C:\Inetpub\wwwroot\vote.cgi": No such file or
directory
--- End of Error Message ---

I realize that I need to change the path information somehow. Can someone
help?

The cgi-bin files are in C:\Inetpub\wwwroot\cgi-bin\vote.cgi not the
directory above in the error message.

Tyler M.
mailto:uttyler@hotmail.com?subject=PerlHelp





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

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


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