[7679] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1305 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 12 07:15:24 1997

Date: Wed, 12 Nov 97 04:00:25 -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           Wed, 12 Nov 1997     Volume: 8 Number: 1305

Today's topics:
     Re: "perl aware" vi editor? twod@not.valid
     Re: "perl aware" vi editor? (Andreas Karrer)
     Re: "perl aware" vi editor? <spam@oyt.oulu.fi>
     Re: Anxiously awaiting my Perl Resource Kit <mak@mark.dircon.net>
     child-process workaround for taint-mode glob? <jbc@west.net>
     Re: Contract Programming Opportunity <oshcnslt@dimensional.com>
     Re: creating file (Tad McClellan)
     Debugger (Ryuji Yokoyama)
     Re: Distribution of perl for windows platforms (Danny Aldham)
     Re: File name problem when using PERL to send binary fi (Tad McClellan)
     Re: Foo - Bar <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
     Re: Foo - Bar <westxga@ptsc.slg.eds.com>
     Re: header files for scripts run from procmail? <djacobs@tsoft.com>
     Help subroutines! (Ryuji Yokoyama)
     Re: Help subroutines! (Toutatis)
     HTTP/1.0 501 Not Supported sheets.david.e@bigfoot.com
     Initiating Write from a CGI <patrick@mediacity.com.sg>
     Open, File-handle problems. (Thomas Kajhoej)
     Re: oraperl <Jacqui.Caren@ig.co.uk>
     Perl Script for Whois Gateway at Internic <Viper010101@hotmail.com>
     Re: printing lines following the line with a match (Tad McClellan)
     Problem interfacing with C.......... (B.S.LEE)
     Problems with system() in a for loop jmack@p3.net
     Proxy Authorization with LWP (Danny Aldham)
     Seattle-based Perl Programmer Wanted <timtyler@timtyler*.com>
     Re: Single and Double quotes <mak@mark.dircon.net>
     Re: SQL and Perl <Jacqui.Caren@ig.co.uk>
     Re: SQL and Perl <kscott@pcisys.net>
     Re: Statistics for comp.lang.perl.misc (Tad McClellan)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 12 Nov 1997 06:17:11 GMT
From: twod@not.valid
Subject: Re: "perl aware" vi editor?
Message-Id: <64bhl7$q48$1@vnetnews.value.net>

 wrote:
: I'm not sure what I mean, but this is what got me curious:
: foreach $user (@users) {
: 	if (-f "$home{$user}/.nexrc") {

The .nexrc file is summat like a .exrc file but used by 'nex' or 'nvi', which
is a Berkeley/*BSD version of 'ex' and 'vi'.

Never used it though - stick to xemacs :)

IAP
--
In an attempt to reduce junk email I use an invalid 'From' address.
My correct email address can be determined by replacing 'not.valid' with 
'value.net'


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

Date: 12 Nov 1997 09:56:41 GMT
From: karrer@ife.ee.ethz.ch (Andreas Karrer)
Subject: Re: "perl aware" vi editor?
Message-Id: <slrn66ivb0.ls8.karrer@kuru.ee.ethz.ch>

In article <3467D5EA.4267@aol.com>, , snailgem@aol.com wrote:

>Does anyone know what a "perl aware" vi editor is?

nvi, Keith Bostic's Berkeley vi (http://mongoose.bostic.com/vi/)
can be compiled with a perl extension by Sven Verdoolaege. (Also --
heresy! -- with a tcl extension).

You can say

  :perldo <any perl statement that operates on $_>

You can extend the editor with commands written as perl subs.

 - Andi


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

Date: 12 Nov 1997 13:20:29 +0200
From: Janne Himanka <spam@oyt.oulu.fi>
Subject: Re: "perl aware" vi editor?
Message-Id: <x4lnyuz7cy.fsf@clovis.oulu.fi>

>>>>> "twod" == twod  <twod@not.valid> writes:

    twod> The .nexrc file is summat like a .exrc file but used by
    twod> 'nex' or 'nvi', which is a Berkeley/*BSD version of 'ex' and
    twod> 'vi'.

Take a look at 
http://www.sleepycat.com/vi/

A new version that fully supports embedded perl 5.004 is in the
works. I could not get embedding to work with the nvi 1.79.

Janne
--
Lone Ranger  and  Tonto were riding down the line, + shem@oyt.erasethis.oulu.fi
fixing everybody's troubles, everybody's but mine, + Continuing Educ. Centre
someone must have told them that I was doing fine. + Oulu University, Finland



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

Date: Wed, 12 Nov 1997 10:25:46 +0000
From: Mark Morgan <mak@mark.dircon.net>
Subject: Re: Anxiously awaiting my Perl Resource Kit
Message-Id: <3469842A.532971B8@mark.dircon.net>

Blake D. Mills IV wrote:

> I'm due to receive my PRK in the next day or so, and am rather excited
> about it.  Has anyone out there already recieved a kit, or possibly
> tested the pre-releases?  Anyone have any first-impressions?
>
> -Blake

  I've not heard any info of a PRK.  Would you be able to point me to
information on this?

Thanks.
Mark.




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

Date: Tue, 11 Nov 1997 23:09:05 -0800
From: John Callender <jbc@west.net>
Subject: child-process workaround for taint-mode glob?
Message-Id: <34695611.9D34231A@west.net>

I'm not very good at this IPC stuff, and I'm having a hard time making a
setuid CGI script successfully do wildcard globs under perl 5.004. (I
realize that the fact that this same script ran fine under 5.003 was due
to a security hole, and that my having to try to fix this in a hurry now
that my sysadmin has upgraded his copy of perl is a just punishment
inflicted on me by the perl gods for my original sloppy code.)

Anyway, having sent many gigawatts of prayers and invocations into the
ether, and having been so far unanswered by any successful taint-mode
wildcard globbing, I'm wondering if any of you gurus out there would be
willing to enlighten me with a working example of the appropriate way to
implement the tantalizingly unspecified child-process workaround
referred to in the perlsec and perlipc manpages:

[perlsec example]

           use English;
           die unless defined $pid = open(KID, "-|");
           if ($pid) {           # parent
               while (<KID>) {
                   # do something
               }
                close KID;
           } else {
               $EUID = $UID;
               $EGID = $GID;    # XXX: initgroups() not called
               $ENV{PATH} = "/bin:/usr/bin";
               exec 'myprog', 'arg1', 'arg2';
               die "can't exec myprog: $!";
           }

       A similar strategy would work for wildcard expansion via
       glob.

I couldn't get that example to work, but I made some actual progress
starting with the one in the perlipc manpage:

[perlipc example follows]

           # add error processing as above
           $pid = open(KID_TO_READ, "-|");
           if ($pid) {   # parent
               while (<KID_TO_READ>) {
                   # do something interesting
               }
               close(KID_TO_READ) || warn "kid exited $?";

           } else {      # child
               ($EUID, $EGID) = ($UID, $GID); # suid only
               exec($program, @options, @args)
                   || die "can't exec program: $!";
               # NOTREACHED
           }

I tried to put this in a test script, and modify it to do what I thought
would pass for secure wildcard globbing, but, well, it didn't. Here's
what I tried (no snickering, please):

#!/usr/local/bin/perl -T

          # add error processing as above
           $pid = open(KID_TO_READ, "-|");
           if ($pid) {   # parent
               while (<KID_TO_READ>) {
                   # do something interesting
                   push @stuff; # seemed interesting to me...
               }
               close(KID_TO_READ) || warn "kid exited $?";

           } else {      # child
               ($EUID, $EGID) = ($UID, $GID);
                $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
               exec('ls', '-1', '../????/??????.html')
                   || die "can't exec program: $!";
               # NOTREACHED
           }

print "@stuff";

When I run this, I get the following:

ls: ../????/??????.html: No such file or directory
kid exited 256 at temp.pl line 10.

So, the child is exiting with a failure becaues ls doesn't like being
exec'd like this? Yet when I run "ls -1 ../????/??????.html" from the
shell I get all kinds of filenames listed, 1 per line, just like I
wanted.

Sigh. Any help will be gratefully acknowledged, and even appreciated,
especially if you're not *too* snotty about my lack of clue, and
especially if I can actually understand it.

Thanks.

--
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Wed, 12 Nov 1997 03:04:24 -0700
From: "Kirk D. Haines" <oshcnslt@dimensional.com>
Subject: Re: Contract Programming Opportunity
Message-Id: <34697F28.46D436D7@dimensional.com>

Dan Gauthier wrote:
> 
> I am looking for a Perl programmer in the Houston, TX area to develop
> Web-based applications.  Most apps involve integrating with an SQL
> database - currently MySQL.

I am not in the Houston area.  Rather, I am a bit north of you in the
Denver, CO area.  However, if you are interested, I am a senior software
engineer with approximately three years experience with Perl and
database work.  I am specifically familiar with MySQL and have written
several applications in use in high capacity production environments
combining MySQL and Perl.

If you are interested in working with me, I would like to know some more
specifics on the kinds of applications you are looking at and what sort
of timeframe/time commitment you are looking for.


Kirk Haines
OSH Consulting


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

Date: Tue, 11 Nov 1997 21:59:27 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: creating file
Message-Id: <vi9b46.pha.ln@localhost>

Steven Paul Adelman (crew@gladstone.uoregon.edu) wrote:

: Is there a better way to create a file from a CGI script using PERL than 
: system('echo >/foo/bar');


Yes.

   system('>/foo/bar') && die "could not create '/foo/bar'  $!";


Check to see if it really did what you asked it to do...


or just do an open() and close()


: thankyou 

You're welcome.


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Wed, 12 Nov 1997 04:44:55 GMT
From: rqy1319@is4.nyu.edu (Ryuji Yokoyama)
Subject: Debugger
Message-Id: <346a33a3.3194976@netnews.nyu.edu>

Hello!

I am using Perl for Win32 and looking for a debugger.  Is there any
debugger for this?

Thanks! 

Ryuji Yokoyama
rqy1319@is4.nyu.edu


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

Date: 11 Nov 1997 09:49:20 -0800
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: Distribution of perl for windows platforms
Message-Id: <64a5r0$lv5$1@lennon.postino.com>

Aviel Rubin (rubin@quip.eecs.umich.edu) wrote:
: 2. Has anyone considered a self-extracting, self-installing distribution
:    of perl for windows, say perl.exe? Perhaps an Installshield version would
:    be best.

This already exists at www.activestate.com.

--
Danny Aldham           SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm


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

Date: Tue, 11 Nov 1997 22:13:04 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: File name problem when using PERL to send binary files over CGI
Message-Id: <gcab46.qla.ln@localhost>

David (mysun@mbox2.singnet.com.sg) wrote:

: #Read input file & sen to STDOUT
        ^^^^^
        ^^^^^

: while (<STDOUT>){
             ^^^
             ^^^  ??

--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Tue, 11 Nov 1997 20:03:07 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Foo - Bar
Message-Id: <64b9ok$pav@mtinsc03.worldnet.att.net>

Kelvin has broken the cabal of silence! He must be ritually defenestrated .
 . .

Kelvin D. Olson wrote in message <3468893C.2781@pubgroup.com>...

<much Stuff that Man was Not Meant To Know stripped>




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

Date: Tue, 11 Nov 1997 12:02:15 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: Foo - Bar
Message-Id: <34684947.590E@ptsc.slg.eds.com>

Georg Edelmayer wrote:
> 
> Hi all!
> 
> This might be out of subject (and if it is, please ignore this posting)
> but as one who is not a -programmer- but interested in programming i
> once again found 'foo' and 'bar' mentioned in some examples.
> 
> I realise that nearly every programming language manual or doc or
> whatever uses foo and bar when explaining code.
> Like 'hello world' is the first thing everyone codes ;-)
> 
> So can any of you tell me where this names come from?
> It could be any names, so why foo and bar?
> 
> Thanks in advance
> 
> Georg

Foo Bar is most often seen as one misspelled acronym (more correctly
FUBAR).  It stands for "Fouled (or your favorite F swear word) Up Beyond
All Recognition".  Not to be confused with Snafoo or Snafu which
represents "Situation Normal, All Fouled (or again, your favorite swear
word beginning with the letter F) Up".


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

Date: 12 Nov 97 07:29:24 GMT
From: Doug Jacobs <djacobs@tsoft.com>
Subject: Re: header files for scripts run from procmail?
Message-Id: <34695ad4.0@news.tsoft.net>


Oops, I left out a detail :(

Thanks for the information and pointers.

I have 2 directories, /dev & /prod (Development, Production).

Each have their own libraries and scripts.  I don't want /dev using
stuff in /prod and vice-versa.   These scripts may be called 1 of 2
ways - Procmail or through a webpage.  (there are /prod  and /dev
versions of both my procmailrc and webpages.)

I would like to modify stuff in /dev and copy it over to /prod without
having to make any changes to the scripts.  This includes fixing 
paths (used in "use lib..." for instance.)

A partial solution would be to have Procmail call the script like so:

perl5 -I/dev /dev/script.pl

or

perl5 -I/prod /prod/script.pl

This won't work for webpages where you can only say "ACTION=/prod/script.pl"
or "ACTION=/dev/script.pl".  Also if I change the webpages and move them from
/prod to /dev, I'd have to change their paths again.

Another option maybe to compile the scripts (using the -I option in the
makefile.)  I would like to avoid this for now if possible.

I want to be lazy and just want to copy a file from /dev to /prod and have
it work with no modifications.  Is this possible?

Thanks,
Doug


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

Date: Wed, 12 Nov 1997 04:45:15 GMT
From: rqy1319@is4.nyu.edu (Ryuji Yokoyama)
Subject: Help subroutines!
Message-Id: <346b3459.3377081@netnews.nyu.edu>

Hello All!

I am a beginning and learning Perl by myself. I wrote following
program as practice.  It is an exercise on my book(Lerning Perl), so I
know the different way accomplish the same thing, but I would like to
know what wrong my code is.  I think the correct value of arguments is
not passed or returned.  Please tell me how to fix the problem.


Thanks! I appreciate any advice.

Ryuji Yokoyama
rqy1319@is4.nyu.edu


#This subroutine check the input.
#If the input is 0-9 the return value is 1
#If not, the return value is 0 
#*************************************************************
sub CheckInput { 
     if($_[0] = [0-9]) {
        return 1; }
     else {
	return 0; } 
     } #The end of sub


# This subroutine take a input then convert to English.
#e.g. 1 becomes ONE. 2 becomes TWO
#*************************************************************
 sub convert  {
     if ($_[0] = 0) {
	print"ZERO";}
    elsif ($_[0] = 1) {
	print"ONE";}
    elsif ($_[0] = 2) {
	print"TWO"; }
    elsif ($_[0] = 3) {
	print"THREE";}
    elsif ($_[0] = 4) {
	print"FOUR"; }
    elsif ($_[0] = 5) {
	print"FIVE"; }
    elsif ($_[0] = 6) {
        print"SIX";  }
    elsif ($_[0] = 7) {
	print"SEVEN"; }
    elsif ($_[0] = 8) {
	print"EIGHT"; }
    else {print "NINE";}
}	#The end of subroutine 
	

#This is the main program
#*********************************************************************

print"What number should I convert for you?\n";
$num = <STDIN>;
chomp($num); 
if (CheckInput($num) == 1) {  
   convert($num);
   }
else {
print "Invalid Input";}


   


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

Date: 12 Nov 1997 10:20:05 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Help subroutines!
Message-Id: <toutatis-ya023180001211971120100001@news.euro.net>

rqy1319@is4.nyu.edu (Ryuji Yokoyama) wrote:

>      if($_[0] = [0-9]) {

You probably mean:
       if (0 <= $_[0] && $_[0] <= 9) {
Or:
       if ($_[0] =~ m/^\d$/) {

>      if ($_[0] = 0) {

You probably mean:
       if ($_[0] == 0) {

-- 
Toutatis


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

Date: Tue, 11 Nov 1997 22:51:59 -0600
From: sheets.david.e@bigfoot.com
Subject: HTTP/1.0 501 Not Supported
Message-Id: <879308352.13640@dejanews.com>

I keep getting this message:
HTTP/1.0 501 Not Supported
when I try to call a perl file called test.pl shown below:

this is the test.htm file I'm trying to get working.
<html>
<body>
<form action=http://localhost/cgi-bin/test.pl method=post>
<input type=hidden name=myName value="Ed Rockower">
<input type=text name=importantStuff>
<input type=submit value="Press this button">
</form>
</body>
</html>


test.pl is:
#!/usr/bin/perl
# this is test.pl 10/30/97
require "cgi-lib.pl";
&ReadParse;
print &PrintHeader;
foreach $key (keys %in){
  print "$key = $in{$key}\n<BR>";
}

I'm using win95. I think it has something to do with the files not being
found or something, but I'm not sure, as I'm very new to this. This is a
test from a class I'm taking, and I've probably not set something up
correctly.  I'm using Microsoft personal web server.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 12 Nov 1997 16:22:24 +0800
From: Patrick Stacey <patrick@mediacity.com.sg>
Subject: Initiating Write from a CGI
Message-Id: <34696740.41D2@mediacity.com.sg>

I can write a new file using a command-line driven script with the
following:

#test file
print "Content-Type: text/html\n\n";
print "printing file...";
open(FILE, ">afile.txt");
print FILE "some text";
close(FILE);

However, when I try to run this as a CGI it will not write!
Why?

Any offers of help please?

many thanks


Patrick


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

Date: 12 Nov 1997 08:50:52 GMT
From: kajhoej@kom.auc.dk (Thomas Kajhoej)
Subject: Open, File-handle problems.
Message-Id: <64bqlc$1up$2@sunsite.auc.dk>
Keywords: Open, File-handle, passwd.

Hi there,

I'm running perl 5.003 on a pc running linux (redhat 4.3).

I'm trying to create a perlprogram that starts the program "passwd". 
I want to be able to change my password from within a perl program.
I do the following:

	...
	open PW, "|passwd";
	print PW "my_current_password\n";
	print PW "my_new_password\n";
	print PW "my_new_password\n";
	close PW
	...

But it does not work !?

I found out that when i open the "passwd" command it asks for my curren password, and
thats fine, but when i type in my current_password "print PW "my_current_password\n" 
it does not prompt me for my new password. When i close PW then it just says that my new password is too short!

What am i doing wrong?

Hope you can help me.
	
Thomas
Email: kajhoej@kom.auc.dk



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

Date: Tue, 11 Nov 1997 20:17:57 GMT
From: Jacqui Caren <Jacqui.Caren@ig.co.uk>
Subject: Re: oraperl
Message-Id: <EJI0Dx.JEo@ig.co.uk>

In article <paul1-2710971628340001@d187.nhe.interaccess.com>,
Paul Weinstein <paul1@interaccess.com> wrote:
>When ever I try to run the make file for Oraperl I get the follwoing error:
>
>make: fatal error: don't know how to make /usr6/p/paul1533/oraperl/uperl.o
>(bu42).

This is not Oraperl but oraperl the perl4 extension?

If so then, sorry but I dont work with perl4/oraperl anymore.
It's use is deprecated - you use perl4 at at your own risk.

>Everthing is set correctly and the directory & permissions are
>correct...any ideas?
>
>I'm running on a Nighthawk with CX/UX Version 6.2

Never heard of it - it is a UNIXen?

It is a supported oracle platform? You do have Oracle up and running?

What version of oracle do you have? It is a reasonable release?


If so then, consider getting perl5 and DBI DBD::Oracle and Oraperl.pm

see http://www.hermetica.com/technologia/DBI/

>
>-Paul

Jacqui

-- 
Jacqui Caren                    Email: Jacqui.Caren@ig.co.uk
Paul Ingram Group               Fax: +44 1483 419 419
140A High Street                Phone: +44 1483 424 424
Godalming GU7 1AB United Kingdom



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

Date: Wed, 12 Nov 1997 09:45:18 +0100
From: "Viper" <Viper010101@hotmail.com>
Subject: Perl Script for Whois Gateway at Internic
Message-Id: <64bq10$ji3@dino.active.ch>

I'm looking for a perl script that helps looking up domain names at the who
is gateway at internic.
I saw that some sigts use a script "ordwhois.pl".
If you have this script or any other script that could help me to implement
a search form into my home page, please post it to me at:
mailto:sos-doc@bigfoot.com
Thank you for your help...




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

Date: Tue, 11 Nov 1997 21:52:51 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: printing lines following the line with a match
Message-Id: <j69b46.pha.ln@localhost>

PsyTours (psycler@netcom.com) wrote:

: I am trying to parse a file where I look for pattern-matching
: in a specific line and upon locating that line, that line and
: the following 5 lines (only) get print to the output.

: What is the easiest way to do this?

: I have this simple script so far that prints only the
: line that is matched:

: open (IN, "outfile");

Except your real code checks the return value to see if the file
really got opened OK, right?

   open (IN, "outfile") || die "could not open 'outfile'  $!";


: $line = <IN>;
: while ($line ne "") {
:                 if ($line =~ /[7-9][0-9]/ || $line =~ /Query/) {
:                                 print "$line\n";
:         }
:                 $line = <IN>;
: }
: close (IN);


while (defined ($line = <IN>)) {
#   if ($line =~ /[7-9][0-9]|Query/) {

   if ($line =~ /[7-9][0-9]/ || $line =~ /Query/) {
      print "$line\n";
      print scalar(<IN>);
      print scalar(<IN>);
      print scalar(<IN>);
      print scalar(<IN>);
      print scalar(<IN>);
   }
}


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Wed, 12 Nov 1997 03:52:50 GMT
From: bslee@pl.jaring.my (B.S.LEE)
Subject: Problem interfacing with C..........
Message-Id: <3469280f.9758979@news.jaring.my>


  Currently, I am doing a project on extending perl for Win32 to C++/C
library functions.
I know the h2xs script can help but it only available on unix
platform. I don't have the h2xs scripts which runs on WindowsNT
platform.
I have studied the perlfunc, perlapi, perlmod online manual but I
still have not really got the clear picture on writing XS programme. I
have no idea on compiling the xs file to c file by using xsubpp on
windowsNT..........................


email: bslee@pl.jaring.my 	


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

Date: Wed, 12 Nov 1997 00:32:32 -0600
From: jmack@p3.net
Subject: Problems with system() in a for loop
Message-Id: <879315697.19609@dejanews.com>

I'm having problems with a variable I pass into a system() call.  I need
to grep a months worth of log files for 2 particular pages to make a new
log file for just these 2 pages.  Our logs get big, so they are zipped at
the end of each day.  So these zipped files  need to be copied (for
safety, plus I don't own them), unzipped, egreped, and deleted.

I wrote this simple perl script to automatically copy a log file, unzip
it, grep results to a file and remove the copy.


#!/usr/local/bin/perl

for ($i; $i<=31 ; $i++) {

system "cp /logs/access.$iOct.gz /tmp"; #want the above to resolve to "cp
/logs/access.1Oct.gz /tmp" #then "cp /logs/access.2Oct.gz /tmp" on the
next pass and so on system "gunzip /tmp/access.$iOct.gz"; system "egrep
'(xxx1.html|xxx2.html)' /tmp/access.$iOct >> Oct_access.txt"; system "rm
/tmp/access.$iOct"; sleep 30; }


The output looks like "cp /logs/access.Oct.gz /tmp" for all instances of
the system call that uses $i. My script isn't inserting the value of $i,
so I get errors saying 'file not found'.  How can I pass this variable
into the system function?  I've tried escaping it and some other things
with no luck.

Thanks for any pointers,

John Mack
jmack@p3.net

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 11 Nov 1997 19:32:51 -0800
From: danny@lennon.postino.com (Danny Aldham)
Subject: Proxy Authorization with LWP
Message-Id: <64b813$1l9$1@lennon.postino.com>

I am using LWP version 5.10 , and am trying to go thru a 
Netscape Proxy server version 2.53 . I am getting an error
message that "Resolution of Proxy Authentication required,
not yet implemented." Please tell me it ain't so, and point
me to the correct syntax to get thru the firewall. Thanks.

--
Danny Aldham           SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm


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

Date: Wed, 12 Nov 1997 00:13:27 -0800
From: Tim Tyler <timtyler@timtyler*.com>
Subject: Seattle-based Perl Programmer Wanted
Message-Id: <64bocc$kmj$1@sparky.wolfe.net>

Small Seattle web design company seeks freelance Perl programmer.

You must reside in Seattle, have mSQL, modperl and DBM skills, and love
Perl.

Do you know Apache and FreeBSD? JavaScript?

Are you available on short notice, evenings and weekends?

Do you know any good jokes?

What is your hourly rate?

Send email and/or plain-text resumes to jobs@timtyler.com.

Tim Tyler - Multimedia Design
http://www.timtyler.com/
Seattle, WA

Please do not respond after December 1, 1997.


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

Date: Wed, 12 Nov 1997 10:42:02 +0000
From: Mark Morgan <mak@mark.dircon.net>
Subject: Re: Single and Double quotes
Message-Id: <346987FA.25312747@mark.dircon.net>

Ryuji Yokoyama wrote:
> 
> Hello All!
> 
> I just started to learn Perl by myself and have a question about
> strings.  What is the different single quote and double quote?  When
> do I have to use single quote and double?
> 
> Thanks!
> 
> Ryuji Yokoyama
> rqy1319@is4.nyu.edu

Hello,

Double-quotes allow variable interpolation, whereas single-quotes
don't...for instance:

$a=5;
print "sum=$a";

would print out 'sum=5', whereas if you replaced the double-quotes with
single-quotes, you would get 'sum=$a' from the lines above.

Hope this helps.

Mark.


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

Date: Tue, 11 Nov 1997 20:29:20 GMT
From: Jacqui Caren <Jacqui.Caren@ig.co.uk>
Subject: Re: SQL and Perl
Message-Id: <EJI0wx.JHH@ig.co.uk>

In article <comdog-ya02408000R2410971446130001@news.panix.com>,
brian d foy <comdog@computerdog.com> wrote:
>In article <877711530.6152@dejanews.com>, lb8qc@qcunix1.qc.edu wrote:
>
>>How can I execute SQL commands on a database using a perl script?
>>Do I need a perl of c module for that? If so, where can I get it from?
>
>have you looked into the DBI::* modules on CPAN [1]?  you might also
>look for modules for your particular platform if you are using an
>alien system.
>
>good luck :)
>
>[1] 
>Comprehensive Perl Archive Network
>find one near you at <URL:http://www.perl.com>

and [2]
The DBI Home page
http://www.hermetica.com/technologia/DBI/

Note that DBI is NOT unix only.

DBD::Oracle and DBD::ODBC both work under NT.

Jacqui
-- 
Jacqui Caren                    Email: Jacqui.Caren@ig.co.uk
Paul Ingram Group               Fax: +44 1483 419 419
140A High Street                Phone: +44 1483 424 424
Godalming GU7 1AB United Kingdom



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

Date: Wed, 12 Nov 1997 00:53:12 -0700
From: "Ken Scott" <kscott@pcisys.net>
Subject: Re: SQL and Perl
Message-Id: <64bn9b$s7k$1@newman.pcisys.net>

For completeness sake, it appears that DBD::Informix works on WinNT as well.

--
      w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w
         Ken Scott   kscott@pcisys.net   http://www.pcisys.net/~kscott
                   This is the day that the Lord has made;
                      I will rejoice and be glad in it!
                             -- Psalm 118:24
      w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w=w


Jacqui Caren wrote in message ...
>In article <comdog-ya02408000R2410971446130001@news.panix.com>,
>brian d foy <comdog@computerdog.com> wrote:
>>In article <877711530.6152@dejanews.com>, lb8qc@qcunix1.qc.edu wrote:
>>
>>>How can I execute SQL commands on a database using a perl script?
>>>Do I need a perl of c module for that? If so, where can I get it from?
>>
>>have you looked into the DBI::* modules on CPAN [1]?  you might also
>>look for modules for your particular platform if you are using an
>>alien system.
>>
>>good luck :)
>>
>>[1]
>>Comprehensive Perl Archive Network
>>find one near you at <URL:http://www.perl.com>
>
>and [2]
>The DBI Home page
>http://www.hermetica.com/technologia/DBI/
>
>Note that DBI is NOT unix only.
>
>DBD::Oracle and DBD::ODBC both work under NT.
>
>Jacqui
>--
>Jacqui Caren                    Email: Jacqui.Caren@ig.co.uk
>Paul Ingram Group               Fax: +44 1483 419 419
>140A High Street                Phone: +44 1483 424 424
>Godalming GU7 1AB United Kingdom
>




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

Date: Tue, 11 Nov 1997 21:37:41 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <5a8b46.hea.ln@localhost>

Danny Aldham (danny@lennon.postino.com) wrote:
: Greg Bacon (gbacon@cs.uah.edu) wrote:
: : Following is a summary of articles spanning a 7 day period,
: : beginning at 01 Nov 1997 13:18:11 GMT and ending at
: : 08 Nov 1997 19:31:46 GMT.
: : Top 10 Posters by Number of Posts
: : Top 10 Posters by Volume
: : Top 10 Posters by OCR (minimum of five posts)
: : Bottom 10 Posters by OCR (minimum of five posts)
: : Top 10 Threads by Number of Posts
: : Top 10 Threads by Volume
: : Top 10 Targets for Crossposts
: : Top 10 Crossposters

: Would it be possible to get the Top 10 Posters of RTFM posts?
: I swear, close to 50% of the posts are such a beast. Couldn't
: they just be sent as e-mail?


Would it be possible to get the Top 10 Posters of FAQs?
I swear, close to 50% of the posts are such a beast. Couldn't
they just try and look them up, like the conscientious 'net
citizens do, before they post the same question yet again?


I'm more annoyed by the disease than I am by a symptom of the disease...


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

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

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