[9214] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2809 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 8 01:07:43 1998

Date: Sun, 7 Jun 98 22:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 7 Jun 1998     Volume: 8 Number: 2809

Today's topics:
    Re: delete slice in list (Daniel Grisinger)
    Re: delete slice in list (Ronald J Kimball)
    Re: delete slice in list <due@murray.fordham.edu>
        Form input and file creation (Patrick)
        How to create a file... <lakesoft@skypoint.com>
    Re: How to create a file... (Bob Trieger)
    Re: How to create a file... <tchrist@mox.perl.com>
        line number directives in perl? (Daniel E. Doherty)
    Re: line number directives in perl? <rra@stanford.edu>
    Re: line number directives in perl? (Daniel E. Doherty)
    Re: line number directives in perl? <rra@stanford.edu>
    Re: lines of text, inserting spaces (Ronald J Kimball)
    Re: lines of text, inserting spaces (Larry Rosler)
    Re: newbie ques:  Here Documents <angst@scrye.com>
        offline mode? (Linda Watson)
    Re: offline mode? (Bob Trieger)
    Re: offline mode? <tchrist@mox.perl.com>
        Problem in make <Nancy.Teh@cc.monash.edu.au>
    Re: Reading a file from the bottom up <rlogsdon@io.com>
    Re: Recursive directory movement (Neil Kandalgaonkar)
    Re: Searchable Perl FAQ up (temporary) (Ronald J Kimball)
    Re: Stupid syntax question (ryelah)
    Re: The Very Basics! rpearce@my-dejanews.com
        upload scripts and taint, and other upload problem <vparekh@pobox.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 08 Jun 1998 01:24:20 GMT
From: dgris@perrin.dimensional.com (Daniel Grisinger)
Subject: Re: delete slice in list
Message-Id: <6lfe4g$2e3$1@perrin.dimensional.com>

In article <6lf5jp$9lf$0@206.165.146.137>,
Allan M. Due <due@murray.fordham.edu> wrote:

>@new = map { @$_[0 .. $#$_-3];} [split / /, 'Dvorak keyboard is wonderful.
>Eh eh eh?'];
>works like a charm.
>
>Now if, it not too much to ask, could I request a wee bit more edification?
>I have never seen @$_ before. 
>
The [] wrapping the split creates a reference to an anonymous
array and feeds it to map as $_.  @$_ is simply the array
dereference, $#$_ refers to the last index of the array.

Take a look at perlref and perldsc for more information on
references.

Regards,
Daniel



-- 
Daniel Grisinger       dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                        Dave Clark


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

Date: Sun, 7 Jun 1998 22:04:49 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: delete slice in list
Message-Id: <1da9lwl.dfcal76wq5zaN@bos-ip-1-113.ziplink.net>

Allan M. Due <due@murray.fordham.edu> wrote:

> @aa= splice((split, 'Dvorak keyboard is wonderful. Eh eh eh?'),-3);
> produces the error message:
> Type of arg 1 to splice must be array (not split).
> 
> Which actually makes sense to me as the output can be an array or list of
> scalars (hope I said that correctly) and splice makes no sense in a scalar
> context.
> so
> @aa = split(m/ /,'Dvorak keyboard is wonderful. Eh eh eh?');
> splice (@aa,-3);
> 

It doesn't make as much sense to you as you thought.  In a list context,
the result of splice is a list of scalars.  You might assign that list
to an array, but either way, the result is a list of scalars, not an
array.

splice does make sense in a scalar context.  The result of using splice
in a scalar context is the last element in the list of spliced items.  

For example:
  DB<1> @a = qw(a b c d e f)

  DB<2> $b = splice(@a, 1, 2, 'x')

  DB<3> x $b
0  'c'
  DB<4>

You can also use splice in a void context, which is a kind of scalar
context.

The reason that the first argument to splice must be an array is that
one of the effects of splice is remove elements from the array, and you
can't arbitrarily remove elements from a temporary list.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 8 Jun 1998 02:06:29 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: delete slice in list
Message-Id: <6lfgv5$22r$0@206.165.146.137>


Daniel Grisinger wrote in message <6lfe4g$2e3$1@perrin.dimensional.com>...
>In article <6lf5jp$9lf$0@206.165.146.137>,
>Allan M. Due <due@murray.fordham.edu> wrote:
>
>>@new = map { @$_[0 .. $#$_-3];} [split / /, 'Dvorak keyboard is wonderful.
>>Eh eh eh?'];
>>works like a charm.
>>
>>Now if, it not too much to ask, could I request a wee bit more
edification?
>>I have never seen @$_ before.
>>
>The [] wrapping the split creates a reference to an anonymous
>array and feeds it to map as $_.  @$_ is simply the array
>dereference, $#$_ refers to the last index of the array.
>
>Take a look at perlref and perldsc for more information on
>references.


Thanks, I had it all the way to the @$_, it is the array dereferencing that
I need to look at more closely.  Thanks very much.

Allan M. Due
Due@discovernet.net
Admin@WhiteCrow.net

The beginning of wisdom is the definitions of terms.
- Socrates





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

Date: Mon, 08 Jun 1998 03:01:59 GMT
From: patrickh@innova.net (Patrick)
Subject: Form input and file creation
Message-Id: <357b52d6.992106@news.innova.net>

I'm having some trouble with a form input to a .cgi scripts written in
Perl. The form passes a domain name to the .cgi scripts which uses
&ReadParse(*input) to pull out as $input{domain}. The .cgi is set to
create a file with the name of the domain. For some reason the program
will not create this file. Elsewhere in the same script other files
are created in the same directory, and if I simply set the variable to
a domain name it will create that file.

Is there some extra character on the end or beginning of the input
when read with &ReadParse that I need to take off? If so, how do I
remove it? I would appreciate any help in this, because I've been
working on it a few days now and have had no luck.

Reply by email or post, but I would prefer email. Thanks.

Patrick


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

Date: 8 Jun 1998 02:30:15 GMT
From: "Jonathan A. Laub" <lakesoft@skypoint.com>
Subject: How to create a file...
Message-Id: <01bd9284$a0c8e260$272156c7@dell300>

How does one create a new file using perl5?  I have a working cgi script in
which I wish to write it's output to a "log" file.  I have tried printf and
write(filehandle) with no success.  Any ideas?

Thanks - Jon


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

Date: Mon, 08 Jun 1998 02:54:47 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: How to create a file...
Message-Id: <6lfjsl$i1g$1@ligarius.ultra.net>



"Jonathan A. Laub" <lakesoft@skypoint.com> wrote:
-> How does one create a new file using perl5?  I have a working cgi script in
-> which I wish to write it's output to a "log" file.  I have tried printf and
-> write(filehandle) with no success.  Any ideas?

RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 
RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM RTFM 


HTH

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-239-0341
    and hang up when the recording starts. "


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

Date: 8 Jun 1998 02:47:30 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to create a file...
Message-Id: <6lfjc2$jpg$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, "Jonathan A. Laub" <lakesoft@skypoint.com> writes:
:How does one create a new file using perl5?  I have a working cgi script in
:which I wish to write it's output to a "log" file.  I have tried printf and
:write(filehandle) with no success.  Any ideas?

Yup, read the manpages that come with perl.  Or any of 
about a hundred thousand example programs.  

Read these manpages.  Don't keep going till have:

           perl        Perl overview (this section)
           perldata    Perl data structures
           perlsyn     Perl syntax
           perlop      Perl operators and precedence
           perlre      Perl regular expressions
           perlrun     Perl execution and options
           perlfunc    Perl builtin functions
           perlvar     Perl predefined variables
           perlsub     Perl subroutines
           perlfaq     Perl frequently asked questions

--tom
-- 
    "Big Brother is hallucinating."  
--Elizabeth D Zwicky (zwicky@cis.ohio-state.edu), title of a comp.risks article


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

Date: 07 Jun 1998 22:20:38 -0500
From: ddoherty@sprintmail.com (Daniel E. Doherty)
Subject: line number directives in perl?
Message-Id: <m3solgr33t.fsf@slug.doherty.org>


I am trying to write a program in noweb, using Perl as the programming 
language.  When I get a bug, I'd like to have the debugger know that
the source code has been pre-processed with noweb and display the
source code in the prog.nw file rather than in the generated prog.pl
file.

Can I get perl to do this in a manner analogous to C programs using
the #line directive?  I've looked all over in Programming Perl and
Learning Perl and in the modules index on CPAN, but don't see anything 
that looks obvious.

I would appreciate any hints.

-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Daniel E. Doherty            % 
Roeland Park, KS (USA)       % 
ddoherty@sprintmail.com      % 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                              
Treason never prospers.      %   
What's the reason?           %     
Why if treason ever prosper, %  
None dare call it treason.   %  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                            


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

Date: 07 Jun 1998 20:26:00 -0700
From: Russ Allbery <rra@stanford.edu>
To: ddoherty@sprintmail.com (Daniel E. Doherty)
Subject: Re: line number directives in perl?
Message-Id: <m37m2sk20n.fsf@windlord.Stanford.EDU>

[ Posted and mailed. ]

Daniel E Doherty <ddoherty@sprintmail.com> writes:

> Can I get perl to do this in a manner analogous to C programs using
> the #line directive?

Yup.  You're going to kick yourself when you hear this, but you just use a
#line directive just like you would in C.  :)

> I've looked all over in Programming Perl and Learning Perl and in the
> modules index on CPAN, but don't see anything that looks obvious.

Look at the last section of man perlsyn.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 07 Jun 1998 22:49:29 -0500
From: ddoherty@sprintmail.com (Daniel E. Doherty)
Subject: Re: line number directives in perl?
Message-Id: <m3ra10r1rq.fsf@slug.doherty.org>

Russ Allbery <rra@stanford.edu> writes:

> [ Posted and mailed. ]
> 
> Daniel E Doherty <ddoherty@sprintmail.com> writes:
> 
> > Can I get perl to do this in a manner analogous to C programs using
> > the #line directive?
> 
> Yup.  You're going to kick yourself when you hear this, but you just use a
> #line directive just like you would in C.  :)
> 
> > I've looked all over in Programming Perl and Learning Perl and in the
> > modules index on CPAN, but don't see anything that looks obvious.
> 
> Look at the last section of man perlsyn.
> 

Russ,

Consider myself kicked.  And thanks.  Never noticed that nook of the
perl man pages before.  Will the debugger react to these?

I suppose I can experiment.

-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Daniel E. Doherty            % 
Roeland Park, KS (USA)       % 
ddoherty@sprintmail.com      % 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                              
Treason never prospers.      %   
What's the reason?           %     
Why if treason ever prosper, %  
None dare call it treason.   %  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                            


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

Date: 07 Jun 1998 20:56:19 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: line number directives in perl?
Message-Id: <m3g1hgim1o.fsf@windlord.Stanford.EDU>

Daniel E Doherty <ddoherty@sprintmail.com> writes:

> Consider myself kicked.  And thanks.  Never noticed that nook of the
> perl man pages before.  Will the debugger react to these?

I believe so, but as I don't use the debugger myself, I'm not sure.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Sun, 7 Jun 1998 22:36:33 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: lines of text, inserting spaces
Message-Id: <1da9xvp.1612tzbeg0xu6N@bos-ip-1-113.ziplink.net>

Larry Rosler <lr@hpl.hp.com> wrote:

> In article <6levaj$4m8@news-central.tiac.net>, mike@stok.co.uk says...
> > You might consider using unpack if you're dealing with formatted records.
> > The debugger example below carves up the line into fields containing 4, 4,
> > 5, 6 characters and the rest of the line, and then the print takes
> > advantage of spaces being inserted between array elements inside double
> > quotes:
> > 
> >   DB<1> $str = "112121821745647263562393434941947\n"
> > 
> >   DB<2> @fields = unpack 'a4 a4 a5 a6 a6 a*', $str
> > 
> >   DB<3> print "@fields"
> > 1121 2182 17456 472635 623934 34941947
> 
> Many times no!!!

I have to disagree with you.

> The spaces in the format string of pack/unpack are irrelevant, and may be
> used to enhance readability.

Which Mike seems to be aware of, as he acknowledges that the spaces in
the output are added by the print command.

> The spaces in the output of your print 
> statement are the contents of the $" variable, ' '  by default.  Try 
> setting it to something else and you will see.

Well, yes.  If you stick with the default value of $", the example Mike
provided will do exactly what the original poster wanted.  So...  What's
the problem?

By the way, according to this Perl Conference Pamphlet I got from
O'Reilly a few days ago, in his work with computers Mike Stok has been
"using Perl almost exclusively for the past five years."  So I think
it's safe to assume he knows about $".

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 7 Jun 1998 21:28:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: lines of text, inserting spaces
Message-Id: <MPG.fe508378af2aca19896ab@nntp.hpl.hp.com>

In article <1da9xvp.1612tzbeg0xu6N@bos-ip-1-113.ziplink.net>, 
rjk@coos.dartmouth.edu says...
> Larry Rosler <lr@hpl.hp.com> wrote:
 ... <some ravings of mine snipped>
> Which Mike seems to be aware of, as he acknowledges that the spaces in
> the output are added by the print command.
> 
> > The spaces in the output of your print 
> > statement are the contents of the $" variable, ' '  by default.  Try 
> > setting it to something else and you will see.
> 
> Well, yes.  If you stick with the default value of $", the example Mike
> provided will do exactly what the original poster wanted.  So...  What's
> the problem?

The  problem is in my head.  I just reread the original post, carefully.  
On first reading, I assumed the poster needed the spaces for some sort of 
internal processing, and the solution using "@fields" seemed 
inappropriate use of a side-effect that would print conveniently but not 
apply to the problem.  I was wrong.  In retrospect, "@fields" seems quite 
elegant, and I can see ways to apply it in my own work (specifically, as 
an alternative to 'print join("\t", @fields), "\n";').

> By the way, according to this Perl Conference Pamphlet I got from
> O'Reilly a few days ago, in his work with computers Mike Stok has been
> "using Perl almost exclusively for the past five years."  So I think
> it's safe to assume he knows about $".

Of course.  We all have bad days.  I thought today was his.  It was mine.

> -- 
>  _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
> ( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
>     /                                  http://www.ziplink.net/~rjk/
>         "It's funny 'cause it's true ... and vice versa."
> 

-- 
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com


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

Date: 8 Jun 1998 01:47:04 GMT
From: angst <angst@scrye.com>
Subject: Re: newbie ques:  Here Documents
Message-Id: <6lffqo$o1g$1@jelerak.scrye.com>

Jonathan Stowe <Gellyfish@btinternet.com> wrote:
: Nope.  The quotes around the HTML are alright.  They indicate the kind
: of quoting that is to be used for the whole string. They could equally
: be single quotes if you wanted the whole thing to be treated as a
: single quoted string or backticks if the here document was a list of
: commands to be execusted.

Yah, I realized my error after I posted...oops.  Well, at least I also
included the right answer in the post ;)

-- 
Erik Nielsen <eln@rmci.net>
mail to above (rather than header address) is answered significantly faster.
this post != views of anyone at all, really
"You are like...unix GOD" -- local tech support


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

Date: Mon, 08 Jun 1998 02:30:16 GMT
From: watsons@teleport.com (Linda Watson)
Subject: offline mode?
Message-Id: <watsons-0706981931570001@sle01-pm3-44.teleport.com>

I'm just learning perl and cgi. When I try to test the following (which is
the beginning of an adapted script with lots of subroutines) I get the
message: "(offline mode: enter name=value pairs on standard input)". Is
this because I have commented out the "use Win32::ODBC"? 

It sounds as though I'm supposed to enter some data via the keyboard, but
I can't find that information in my perl/cgi book and don't understand
what it wants me to do. I'm not even sure whether this is a perl thing or
a cgi thing.

Any words of wisdom would be appreciated. 


*******************


#!/usr/bin/perl

require "ctime.pl";

use CGI;
##use Win32::ODBC;

## mod_db.pl Modified 05/07/98
## This script allows volunteers to edit or delete agencies. It can be
## called once for the main menu, once with a list of agencies, once with
## details on an agency, and once to do the editing/deletion.

## Conversion of the date assumes that the ctime/system date
## format is Day Mon Dt Ti:me:SS Year.

$HOLD_STATUS = 1;
$PENDING_STATUS = 2;
$DEAD_STATUS = 3;

$bigbuf=40960;

$thedsn = $LSTADSN;

%months = ("Jan","01","Feb","02","Mar","03","Apr","04","May","05","Jun","06","J\
ul","07","Aug","08","Sep","09","Oct","10","Nov","11","Dec","12");

$query = new CGI;

if(! $query->param) {
    &do_menu();
} elsif($query->param('Submit') eq "List all pending agencies") {
    &do_search($PENDING_STATUS);
} elsif($query->param('Submit') eq "List all agencies on hold") {
    &do_search($HOLD_STATUS);
} elsif($query->param('Submit') eq "List all agencies with dead links") {
    &do_search($DEAD_STATUS);
} elsif($query->param('Submit') eq "Select") {
    &do_edit_form($query->param('rsrcnum'));
} elsif($query->param('Submit') eq "Edit") {
    &do_edit_form($query->param('rsrcnum'));
} elsif($query->param('Submit') eq "Delete") {
    &do_delete();
} elsif($query->param('selitem')) {
    &do_edit_form($query->param('selitem'));
} else {
    print "HTTP/1.0 302 OK\r\n";
    print $query->redirect('http://www.library.open.org/disp_subj.pl');
}


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

Date: Mon, 08 Jun 1998 03:03:14 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: offline mode?
Message-Id: <6lfkch$i1g$2@ligarius.ultra.net>

[ posted and mailed ]

watsons@teleport.com (Linda Watson) wrote:
-> I'm just learning perl and cgi. When I try to test the following (which is
-> the beginning of an adapted script with lots of subroutines) I get the
-> message: "(offline mode: enter name=value pairs on standard input)". Is
-> this because I have commented out the "use Win32::ODBC"? 
-> 
-> It sounds as though I'm supposed to enter some data via the keyboard, but
-> I can't find that information in my perl/cgi book and don't understand
-> what it wants me to do. I'm not even sure whether this is a perl thing or
-> a cgi thing.


Try:

        perl -w yourscript.pl Submit=Select

and see what happens.  When working in offline mode with CGI.pm you have to 
feed the input parameters to the script from the command line. 

HTH

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-239-0341
    and hang up when the recording starts. "


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

Date: 8 Jun 1998 03:06:57 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: offline mode?
Message-Id: <6lfkgh$l18$1@csnews.cs.colorado.edu>

In comp.lang.perl.misc, watsons@teleport.com (Linda Watson) writes:
:I'm just learning perl and cgi. 

I wonder why no one ever posts "I'm just learning C and tcp."

--tom
-- 
    ": fighting for peace is like fucking for virginity (ado@bigcomm.gun.de)
    Yes, but I did manage to increase the amount of virginity in the world
    by that method." --Larry Wall


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

Date: Mon, 08 Jun 1998 14:22:39 +1000
From: Nancy Teh <Nancy.Teh@cc.monash.edu.au>
Subject: Problem in make
Message-Id: <357B670F.BA291E8A@cc.monash.edu.au>

Hi Perl users,

I am trying to install perl 5.004_04 on a sun solaris 2.6. I am fine
with runninh sh Configure but when I run make this is the error I get.
How to get around this problem?

Thank in advance.

# make
make: Warning: Both `makefile' and `Makefile' exist
`sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a perl.o`  perl.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a malloc.o`  malloc.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a gv.o`  gv.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a toke.o`  toke.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a perly.o`  perly.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a op.o`  op.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a regcomp.o`  regcomp.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a dump.o`  dump.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
`sh  cflags libperl.a util.o`  util.c
          CCCMD =  gcc -DPERL_CORE -c  -O   
util.c: In function `Perl_form':
util.c:1107: number of arguments doesn't match prototype
proto.h:125: prototype declaration
util.c: In function `Perl_die':
util.c:1164: number of arguments doesn't match prototype
proto.h:70: prototype declaration
util.c: In function `Perl_croak':
util.c:1231: argument `pat' doesn't match prototype
proto.h:47: prototype declaration
util.c:1231: number of arguments doesn't match prototype
proto.h:47: prototype declaration
util.c: In function `Perl_warn':
util.c:1288: number of arguments doesn't match prototype
proto.h:529: prototype declaration
*** Error code 1
make: Fatal error: Command failed for target `util.o'

Regards,
Nancy Teh
Email:Nancy.Teh@cc.monash.edu.au


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

Date: Sun, 7 Jun 1998 23:24:55 -0500
From: REUBEN LOGSDON <rlogsdon@io.com>
To: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Reading a file from the bottom up
Message-Id: <Pine.BSF.3.96.980607232149.26669A-100000@dillinger.io.com>

On 7 Jun 1998, ? the platypus {aka David Formosa} wrote:
> >this reads the file lien-by-line:
> >open(F,"<file");
> >foreach (<F>) {
> >	$myLine = $_;
> >	&doSomethingWith($myLine);
> >	}
> 
> It reads all the file, and then steps threw it line by line.

Right.  also I misspelled "line".

Using:
	while (<F>) {
would've gone through it line by line which is what I meant and is more
efficient.


> >this reads file line-by-line from last line to first line:
> >open(F,"<file");
> >foreach (reverse <F>) {
> 
> And theis one reads all the file reverses it and then steps thew it line
> by line.

yep


Regards,
Reuben Logsdon



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

Date: 8 Jun 1998 01:07:14 GMT
From: neil@domingo.concordia.ca (Neil Kandalgaonkar)
Subject: Re: Recursive directory movement
Message-Id: <6lfdg2$ps$1@newsflash.concordia.ca>
Keywords: recursion

In article <6l6rv1$i73$1@centralnews2.Central.Sun.COM>,
Jason Weber <jweber@clive.central.sun.com> wrote:
>I would like to be able to use this to go through a whole directory
>structure and report back the names of all of the  directories in that
>file system. 
[...]
>I know that I am not close to being a good programmer but I would like to
>make this work without having to pragerize someone elses material. 


You have a misguided work ethic. "Good programmers know what to write,
great programmers know what to rewrite." (I think that's from the Jargon
File.)

In this case, take a peek at File::Find on the CPAN.





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

Date: Sun, 7 Jun 1998 22:36:35 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Searchable Perl FAQ up (temporary)
Message-Id: <1da9yqa.1poc1eftcpdceN@bos-ip-1-113.ziplink.net>

[posted and mailed]

Mike Heins <mikeh@minivend.com> wrote:

> I have put an experimental Perl FAQ up [...]

Why are the search results returned in reverse order?

For example:

Search Results 

'date'

  1.    perlfaq9 - Networking 
  2.    How do I set the time and date? 
  3.    perlfaq8 - System Interaction 
  4.    perlfaq7 - Perl Language Issues 
  5.    perlfaq6 - Regexps 
  6.    How do I print to more than one file at once? 
  7.    perlfaq5 - Files and Formats 
  8.    Does Perl have a year 2000 problem? 
  9.    How can I find the Julian Day? 
 10.    How can I take a string and turn it into epoch seconds? 
 11.    How can I compare two date strings? 
 12.    Data: Dates 
 13.    perlfaq4 - Data Manipulation 
 14.    perlfaq3 - Programming Tools 
 15.    Archives of comp.lang.perl.misc 
 16.    perlfaq2 - Obtaining and Learning about Perl 
 17.    perlfaq1 - General Questions About Perl

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sat, 06 Jun 1998 13:58:49 GMT
From: ryelah@axess.net (ryelah)
Subject: Re: Stupid syntax question
Message-Id: <677ce$16113a.fd@CLYDE>

In article <6larkq$19bo$1@news.gate.net>, "gateway" <betabeta@geocities.com> wrote:
>    I just started learning Perl, so forgive me if this is stupid. I can't
>seem to get the syntax right. what I want to do is use a loop to cycle
>through all elements in an array, one at a time, using a variable as the
>array index (ie &array[$counter]). can someone clear this up for me.
>I'm sorry if this sounds simple, but I've tried everything I can think of.
>
>Zen
>
>
>

Don't know if this is what your looking for..  I taught myself out of a book 
and I'm still learning all the time but wouldn't an array be @array[$counter]) 
?

Sorry if this doesn't help

Malaise
Malaise@stray.to



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

Date: Mon, 08 Jun 1998 03:23:42 GMT
From: rpearce@my-dejanews.com
Subject: Re: The Very Basics!
Message-Id: <6lflft$ohv$1@nnrp1.dejanews.com>

In article <357AE833.E60EF469@cin.net>,
  Tim & Kim <peach@cin.net> wrote:
>
> Ok,  Lamer question.  Do I have to find a particular CGI directory on my
> web page server?  Can I just put a CGI with Perl program up, where my
> current page is, and have it run?  Very confused about this as the book
> I bought assumes previous genius status.
>    Please e-mail if willing to help!
>          Thanks!
>
>
Check with your ISP to make sure they have Perl installed, which they probably
do.  You don't install Perl, they do.

Next, will they let you run perl scripts from your web directory?  There are
security issues.  If they do, they probably use cgiwrap or similar. It
protects them.	You'll need to create a /cgi-bin/ from your main directory. 
Run the scripts from there.




-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Sun, 07 Jun 1998 23:41:13 -0400
From: Vic Parekh <vparekh@pobox.com>
Subject: upload scripts and taint, and other upload problem
Message-Id: <357B5D58.D5140CA5@pobox.com>

I am using the upload.cgi script provided by terminalp.com

It all seems to work except for the fact that the filesizes of the files
being uploaded is always 0. They get chmodd'ed properly after their
supposed upload.

In the script, if I add some print statements into the file being
uploaded, the statements get printed out to teh file correctly.

I have emailed the author, I was hoping that someone here might have run
into the same thing. Here is some info:
-rw-rw-rw-    1 nobody   60001        178 Jun  7 20:34 worddoc4.doc
{pageson:119} cat w*4*
at file-to-upload-01 we have C:\worddoc4.doc
at title we have adffd
at id we have 5
blahblahblah
0
C:\worddoc4.doc

worddoc4.doc

and here is the code:
        while ($Bytes = read($File_Handle,$Buffer,1024)) {
                        $BytesRead += $Bytes;
            print OUTFILE $Buffer;

        }
        &ReadParse;
         foreach $key (keys %in) {
               print OUTFILE "at $key we have $in{$key}\n";
          }
                     print OUTFILE "blahblahblah\n";
                     print OUTFILE length($Buffer) . "\n";
                     print OUTFILE "$File_Handle\n";
                     print OUTFILE "$BytesRead\n";
                     print OUTFILE "$Filename\n";
                     print OUTFILE "$SAVE_DIRECTORY\n";

can someone please help with this?

also, this script does not work with the taint flag turned on. Is it a
script specific issue, or is there some problem with using taint flag on
upload scripts as a whole?

TIA!



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

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

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