[10793] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4394 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 9 23:07:22 1998

Date: Wed, 9 Dec 98 20:00:20 -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, 9 Dec 1998     Volume: 8 Number: 4394

Today's topics:
    Re: Ambiguous use of values <rick.delaney@home.com>
    Re: Ambiguous use of values (Andrew Allen)
    Re: Ambiguous use of values <rick.delaney@home.com>
    Re: Assignment to same variable (Mark-Jason Dominus)
    Re: Can someone tell me why .... (Martien Verbruggen)
    Re: Can someone tell me why .... (Tad McClellan)
    Re: Checking if a Dir exists (Martien Verbruggen)
    Re: Decent Editor (Michael Rubenstein)
        error <ng@usa.net>
    Re: error (Martien Verbruggen)
    Re: error (Tad McClellan)
        extracting& sorting from ascii file  <arm@home.net>
    Re: extracting& sorting from ascii file (Martien Verbruggen)
        how to make directory tree?? <dimag@idirect.com>
    Re: how to make directory tree?? (Martien Verbruggen)
    Re: How to read a binary file in Perl? How to install m (Ilya Zakharevich)
    Re: How to read a binary file in Perl? How to install m (Martien Verbruggen)
    Re: HTML Embedded in Perl <prauz@sprynet.com>
        JPL info wanted... <davidjan@mtu.edu>
    Re: JPL info wanted... (Tad McClellan)
    Re: Need a database editor (Martien Verbruggen)
        PELRSHOP - not recognising SSI jira@my-dejanews.com
    Re: Perl glob one-liner problem on Win95 (Randy Kobes)
    Re: Perl, ORacle & Linux <jeremys@piocon.com>
    Re: Perlshop Customization Questions jira@my-dejanews.com
    Re: reading comma delimited data files (Tad McClellan)
    Re: Regular Expression:  Irregular spacing in email mes (Ilya Zakharevich)
    Re: Regular Expression:  Irregular spacing in email mes (Martien Verbruggen)
    Re: TCL <-> PERL, what's better. (Martien Verbruggen)
    Re: win32 messages (Martien Verbruggen)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 10 Dec 1998 02:42:46 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Ambiguous use of values
Message-Id: <366F36CA.4FDA786A@home.com>

[posted & mailed]

Bill Moseley wrote:
> 
> I'm getting the following error
> 
>   Ambiguous use of values => resolved to "values" => at reg2.cgi line 
>   523.
>
>   523  print $query->hidden(-name=>$name,-values=>$_[0]);
> 
> What's the proper quoting syntax for this to avoid the warning?

You could use what was suggested by the warning:

    print $query->hidden(-name=>$name,"values"=>$_[0]);

or in this case, using CGI.pm, you could capitalize some of the letters:

    print $query->hidden(-Name=>$name,-Values=>$_[0]);

> I don't get this under Active State 5.005_02

Interesting.

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: 10 Dec 1998 03:25:06 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Ambiguous use of values
Message-Id: <74neui$as3@fcnews.fc.hp.com>

Rick Delaney (rick.delaney@home.com) wrote:
: [posted & mailed]

: Bill Moseley wrote:
: > 
: > I'm getting the following error
: > 
: >   Ambiguous use of values => resolved to "values" => at reg2.cgi line 
: >   523.
: >
: >   523  print $query->hidden(-name=>$name,-values=>$_[0]);
: > 
: > What's the proper quoting syntax for this to avoid the warning?

: You could use what was suggested by the warning:

:     print $query->hidden(-name=>$name,"values"=>$_[0]);

You probably want "-values" or '-values' instead, to keep the hyphen.

Andrew


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

Date: Thu, 10 Dec 1998 03:53:17 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Ambiguous use of values
Message-Id: <366F4768.48A9F652@home.com>

[posted & mailed]

Andrew Allen wrote:
> 
> Rick Delaney (rick.delaney@home.com) wrote:
> 
> :     print $query->hidden(-name=>$name,"values"=>$_[0]);
> 
> You probably want "-values" or '-values' instead, to keep the hyphen.

Most of the time, yes, but in this case where CGI.pm is obviously being
used it is unnecessary since it will just be stripped off anyway.

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: 9 Dec 1998 22:37:00 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Assignment to same variable
Message-Id: <74nfks$j8g$1@monet.op.net>

In article <39emq9rp4o.fsf@ibnets.com>, Uri Guttman  <uri@ibnets.com> wrote:
>>>>>> "NT" == Niral Trivedi <niral@corporate.planet.net> writes:
>in fact, join( $string, $value ) is a silly thing to write. maybe it
>should be warned under -w.

That would suck.  I write

	join(':', @fields);

all the time, and I don't want it issuing some bogus warning every
time @fields happens to have only a single element.


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

Date: Thu, 10 Dec 1998 01:27:42 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Can someone tell me why ....
Message-Id: <isFb2.126$jp4.275@nsw.nnrp.telstra.net>

In article <74n0k1$g0s$1@black.news.nacamar.net>,
	"Owen" <info@kn1.com> writes:

> If you ever need any html or Java help, dont come looking to us.

ok.

*plonk*

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I think there is a world market for
Commercial Dynamics Pty. Ltd.       | maybe five computers. --Thomas Watson,
NSW, Australia                      | chairman IBM, 1943


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

Date: Wed, 9 Dec 1998 19:01:27 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Can someone tell me why ....
Message-Id: <7h6n47.dj7.ln@magna.metronet.com>

Owen (info@kn1.com) wrote:
: I did not write the script. It is Freeware from the CGI resource.

: That said, I posted here hoping to get some help 


   And you got some.


: and maybe learn something
: form you guys.


   You (should have) learned to check the return values from
   all calls to the operating system.

   When you did that, you would get some clues as to what
   was going wrong.

   Getting clues as to what is going wrong *is* help.

   The original author should have checked return values, but (s)he didn't.

   So you should. Or find a different script to get the job done.

   (It is extremely bad style to not check such things, indicating
    that your freeware was written by a hobbyist rather than
    a real programmer. That's OK, but you have to expect exactly
    what you are experiencing with hobbyist caliber code...
   )


: I wish I had not bothered.


   Why not?

   After fixing the code (to check return values) you still cannot
   tell what part of the program is giving you grief?


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


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

Date: Thu, 10 Dec 1998 01:39:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Checking if a Dir exists
Message-Id: <1DFb2.129$jp4.275@nsw.nnrp.telstra.net>

In article <74lium$6ep$1@plug.news.pipex.net>,
	"Artoo" <r2-d2@REMOVEbigfoot.com> writes:
> How can you check to see if a directory already exists before trying to
> create one?

You can use the -d file test. Of course you only check to see if there
is a _directory_ with that name, not if there's possibly something
else with that name. You could use -e for that.

I normally just try to create it with mkdir and then check wether that
failed or succeeded. Takes care of most cases. Then when it fails you
can investigate why it failed, if you need to do that automatically.
You can of course just exit with an appropriate message which includes
the $! variable if all you are interested in is some output as to why
it failed.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd.       | negative.
NSW, Australia                      | 


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

Date: Thu, 10 Dec 1998 01:14:55 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Decent Editor
Message-Id: <366f1ecf.289351205@nntp.ix.netcom.com>

On Wed, 9 Dec 1998 19:38:26 -0000, "Antony McNulty"
<tony_mc@hotmail.com> wrote:

>OK people calm down, let's not get worked up here....
>
>
>I'm on a Windows platform, have access to a UNIX platfom, but prefer to use
>Windows.
>
>I noticed many editors mentioned were UNIX, any ideas for the PC then ??

Emacs and vi have excellent Windows versions.  My preference is GNU
emacs, but if you prefer vim is an excellent vi-like editor.  Both GNU
emacs and vim provide either character mode or windowed editing.

--
Michael M Rubenstein


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

Date: Wed, 9 Dec 1998 19:48:46 -0600
From: "Enrico Ng" <ng@usa.net>
Subject: error
Message-Id: <74n9eo$eop$1@info3.fnal.gov>

I get this message when I run my perl program.

Can't locate mmcgilib.pl in @INC (@INC contains:
E:\perl\5.00502\lib/MSWin32-x86-object E:\perl\5.00502\lib
E:\perl\site\lib/MSWin32-x86-object E:\perl\site\lib .) at
E:\CGI-BIN\mail\mmstdo.pl line 176.

does any one know what it means?

--
--
Enrico Ng <ng@usa.net>
WVHS Internet
http://www.ipsd.org/wvhs





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

Date: Thu, 10 Dec 1998 02:51:21 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: error
Message-Id: <JGGb2.145$jp4.275@nsw.nnrp.telstra.net>

In article <74n9eo$eop$1@info3.fnal.gov>,
	"Enrico Ng" <ng@usa.net> writes:
> I get this message when I run my perl program.
> 
> Can't locate mmcgilib.pl in @INC (@INC contains:
> E:\perl\5.00502\lib/MSWin32-x86-object E:\perl\5.00502\lib
> E:\perl\site\lib/MSWin32-x86-object E:\perl\site\lib .) at
> E:\CGI-BIN\mail\mmstdo.pl line 176.
> 
> does any one know what it means?

Let me translate it for you.

(Perl) Can't locale mmcgilib.pl in @INC. (And this is what @INC
contains) (followed by the line number where the error occurs)

Now what is it that you don't understand? perl complains that it can't
find a file called mmcgilib.pl. Possibly you have a require
mmcgilib.pl somewhere in your code, possibly at line number 176. Check
the code. Make sure that you want that file. If you have made sure of
that, install it somewhere, preferably in a place that is included in
@INC.  Read the documentation on how to do that.

# perldoc -f require
# perldoc perlvar
[search for @INC]

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: Wed, 9 Dec 1998 20:40:10 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: error
Message-Id: <aacn47.b48.ln@magna.metronet.com>

Enrico Ng (ng@usa.net) wrote:
: I get this message when I run my perl program.

: Can't locate mmcgilib.pl in @INC (@INC contains:
: E:\perl\5.00502\lib/MSWin32-x86-object E:\perl\5.00502\lib
: E:\perl\site\lib/MSWin32-x86-object E:\perl\site\lib .) at
: E:\CGI-BIN\mail\mmstdo.pl line 176.

: does any one know what it means?


    The messages that perl might issue are described in the
    file 'perldiag.pod' on your hard disk (it comes with the
    perl distribution).

    For your message it says:

---------------------
=item Can't locate %s in @INC

(F) You said to do (or require, or use) a file that couldn't be found
in any of the libraries mentioned in @INC.  Perhaps you need to set the
PERL5LIB or PERL5OPT environment variable to say where the extra library
is, or maybe the script needs to add the library name to @INC.  Or maybe
you just misspelled the name of the file.  See L<perlfunc/require>.
---------------------


   Perl looked in all those directories named in the message,
   and did not find a file named 'mmcgilib.pl' in any of them.


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


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

Date: Thu, 10 Dec 1998 01:34:08 GMT
From: Alan Melton <arm@home.net>
Subject: extracting& sorting from ascii file 
Message-Id: <366F230F.68038385@home.net>

I have written a file that extracts data from a fixed length
ascii file:

ANTH -232 -A  -34BROCKMANN      0010CONDON         0-8135-1364-2INUIT
YOUTH (P)                                             RUTGRYCR
SOC-232-A-20     0010    88 17.55
13.1500000000054956                              11209882SPRING 1999
ANTH -232 -A  -34BROCKMANN      0010SCHLEGEL      
0-02-927895-3ADOLESCENCE: ANTHROPOLOGICAL INQUIRY                       
SS   YCR SOC-232-A-20     0010    91 36.10
27.1000000000054955                              11209882SPRING 1999
ANTH -250 -A  -34PATRON         0015GALEANO        0-85345-991-6OPEN
VEINS OF LATIN AMERICA (25TH ANNIV ED) (P)             MONTHYCR
250-A-20         0015    98 18.00
13.5000000000059685                              12019882SPRING 1999

perl program is:

#!/usr/local/bin/perl
$basedir='/info/www/etc/';
$searchdir='/info/www/etc/';

chdir "$basedir" or die "Cannot chdir: $!";
open OUTPUT, ">sxu.dat" or die "cannot append to output: $!";
chdir "$searchdir" or die "Cannot chdir: $!";
for $filename ("sxutext.txt") { 
  open (IN, "<$filename") or die "Cannot read $filename: $!";


$count=0001;

@titles = qw/CAT CAT21 CAT3 CAT22 CAT4 CAT23 CAT2 CAT5 CAT24 CAT6 CAT7
NAME CAT8 CAT9 CAT25 CAT10 PRICE/;
while (<IN>) {
    chomp;
    
    @f = unpack 'A5 A1 A3 A2 A3 A1 A2 A15 A4 A15 A13 A60 A5 A1 A25 A5
A6', $_;
    $count++;


  print OUTPUT join ('|', map {$_ . '=' . shift @f} @titles),
"|SKU=$count|TAX=Y|SHG=A|SH=\@total|\n";

  
}
    close IN;
}
1;

export is wonderful but I want to take the values of CAT2, CAT3 and CAT4
and merge them together in that order, even though they are being
extracted in a different order.
Would also like to exclude the (including) joining of CAT21, CAT22,
CAT23 from final output.

How can I modify the program to do this.

A Melton


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

Date: Thu, 10 Dec 1998 02:18:14 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: extracting& sorting from ascii file
Message-Id: <GbGb2.137$jp4.275@nsw.nnrp.telstra.net>

In article <366F230F.68038385@home.net>,
	Alan Melton <arm@home.net> writes:

> @titles = qw/CAT CAT21 CAT3 CAT22 CAT4 CAT23 CAT2 CAT5 CAT24 CAT6 CAT7
> NAME CAT8 CAT9 CAT25 CAT10 PRICE/;
 
>     @f = unpack 'A5 A1 A3 A2 A3 A1 A2 A15 A4 A15 A13 A60 A5 A1 A25 A5
> A6', $_;

> export is wonderful but I want to take the values of CAT2, CAT3 and CAT4
> and merge them together in that order, even though they are being
> extracted in a different order.

You don't give us enough data. Do you want to leave the values in
there, and add a new fields with the merged ones? or do you ant to
replace one of them with the merged value, and leave the others? Or do
you want to get rid of all of them, and add a new one?

Use something like 

my $cat234 = join(':', @f[6, 2, 4]);

> Would also like to exclude the (including) joining of CAT21, CAT22,
> CAT23 from final output.

You can use splice to get rid of elements in the middle of an array

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Wed, 9 Dec 1998 20:28:40 -0400
From: "Gorbatchev Dmitri" <dimag@idirect.com>
Subject: how to make directory tree??
Message-Id: <366f2350.0@nemo.idirect.com>

Hi!

i'm trying to make a directory tree, but i can't. Next code show each
directory, but don't show path to directoryes :( how to make a directory
tree??? plz, tell me somebody!!

$dir = 0;
sub SearchDir
{
 chdir $_[0] || die "can't opendir $_[0]: $!";
 opendir(DIR, ".");
 foreach (readdir DIR) {
  if(($_ ne ".") && ($_ ne "..") && (-d $_)) {
   local($d) = "";
   push(@dirs, "$_\\");
   $deep++;
   SearchDir($dirs[$dir++]);
   $deep--;
   chdir "..";
  }
 }
 closedir(DIR);
}
SearchDir(".");
foreach (@dirs) {
 print "$_\n";
}





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

Date: Thu, 10 Dec 1998 02:04:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: how to make directory tree??
Message-Id: <e%Fb2.135$jp4.275@nsw.nnrp.telstra.net>

In article <366f2350.0@nemo.idirect.com>,
	"Gorbatchev Dmitri" <dimag@idirect.com> writes:
> Hi!
> 
> i'm trying to make a directory tree, but i can't. Next code show each
> directory, but don't show path to directoryes :( how to make a directory
> tree??? plz, tell me somebody!!

# perldoc File::Find

Keep a counter for the depth of the tree. 

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Advertising:  The science of arresting
Commercial Dynamics Pty. Ltd.       | the human intelligence long enough to
NSW, Australia                      | get money from it.


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

Date: 10 Dec 1998 01:14:16 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: How to read a binary file in Perl? How to install mod_perl?
Message-Id: <74n798$ije$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to William Tang
<wtang@flash.net>],
who wrote in article <01be23cb$f4212a20$5d68b9a3@wtang-sgl.sugar-land.geco-prakla.slb.com>:
> In perl I did not find any similar method to open this binary file. Can
> Perl open a binary file, which will store the float number one by one
> without '\n' ?

Perl can do practically anything (which is algorithmically possible).
What you could do was to state your question unambitionally.  I cannot
make anything out of your question.  

Does a file with 5 bytes "12345" contains 4 floating numbers, 1, 23,
4, and 5?

Ilya


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

Date: Thu, 10 Dec 1998 02:02:50 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How to read a binary file in Perl? How to install mod_perl?
Message-Id: <eZFb2.134$jp4.275@nsw.nnrp.telstra.net>

In article <01be23cb$f4212a20$5d68b9a3@wtang-sgl.sugar-land.geco-prakla.slb.com>,
	"William Tang" <wtang@flash.net> writes:

> 1. I have a binary data file needs to be read from Perl. In C I do like
> this:
> File *fp;
> float *stringptr;
> stringptr = (float*)malloc((numberofdata)*sizeof(float));
> fp = fopen("data.dat","rb);
> fread(stringptr,sizeof(float),numberofdata,fp);
> fclose(fp);

That, of course, is invalid c and would not compile. But that is
hardly important.

> In perl I did not find any similar method to open this binary file. Can
> Perl open a binary file, which will store the float number one by one
> without '\n' ?

# perldoc -f binmode
# perldoc -f pack
# perldoc -f unpack
# perldoc -f print

> 2. I tried to install mod_perl with Apache1.3.3, before I installed
> apache as:
[snip]
> How to do I tell the server to look the correct directory

That is not a perl question, but a question about configuring
Apache. Ask in a newsgroup about www servers.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: Thu, 10 Dec 1998 03:00:46 +0000
From: Balazs Rauznitz <prauz@sprynet.com>
To: backslashxt@yahoo.com
Subject: Re: HTML Embedded in Perl
Message-Id: <366F395E.38934268@sprynet.com>

backslashxt@yahoo.com wrote:
> 
> I have a problem in trying to output HTML along with the output of a perl
> script. What I would like to do is have a perl script populate some of the
> data in a html page. Basically, what I would like to do is open an external
> HTML file and in the HTML page have the variable names (ie: $name, $url,
> $email) in the HTML code. When Perl reads the HTML file, it should populate
> the data, but the scipt rather takes all variable names as literal
> characters.

go to www.perl.com or CPAN and search for templates; i use
CGI::FastTemplates, but you know what you need.

good luck.

Balazs


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

Date: 10 Dec 1998 01:59:21 GMT
From: David J. Anderson <davidjan@mtu.edu>
Subject: JPL info wanted...
Message-Id: <74n9tp$mlm$1@campus1.mtu.edu>

I was looking for a way to put a graphical interface using Java onto a
perl program. I looked at the info about JPL (confusing) and as I seem to
have read, it only comes in the build for perl (5.005_54) which also says
that you should only use that build of perl if you "like to sit on
bleeding edges".  Anyone used this build? Would I be a foolish student to
ask our sysadmin to upgrade our ver. of perl so that I could impliment
Java into my perl programs, or is there another way?

Thanks,
 Dave

-- 
                        \\\|///
                      \\  - -  //
                       (  @ @  ) 
+--------------------oOOo-(_)-oOOo----------------------+
| David J. Anderson @ Michigan Tech...I think   %-}     |
|             Computer Science Major                    |
| Web page: http://www.csl.mtu.edu/~davidjan            |
+----------------------------Oooo-----------------------+
                      oooO   (   )
                     (   )    ) /
                      \ (    (_/
                       \_)



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

Date: Wed, 9 Dec 1998 20:43:31 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: JPL info wanted...
Message-Id: <jgcn47.b48.ln@magna.metronet.com>

David J. Anderson (davidjan@mtu.edu) wrote:
: I was looking for a way to put a graphical interface using Java onto a
                                                       ^^^^^^^^^^

   Is that a *requirement*, or just one way of getting the
   GUI that you want.


   You can use Tk with Perl to make GUIs.

   See comp.lang.perl.tk


: perl program. I looked at the info about JPL (confusing) and as I seem to
: have read, it only comes in the build for perl (5.005_54) which also says
: that you should only use that build of perl if you "like to sit on
: bleeding edges".  Anyone used this build? Would I be a foolish student to
: ask our sysadmin to upgrade our ver. of perl so that I could impliment
: Java into my perl programs, or is there another way?

   
   Snow over your head yet up there?


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


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

Date: Thu, 10 Dec 1998 01:34:59 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Need a database editor
Message-Id: <7zFb2.127$jp4.275@nsw.nnrp.telstra.net>

In article <74lgls$5vo@sjx-ixn10.ix.netcom.com>,
	"Mark Givens" <mgivens@kidswish.org> writes:
> Hello, I am searching for a PERL based password protected program that will
> allow me to edit, add, delete, etc. records in a pipe delimited database.

I suppose that 'pipe delimited' means that you have a flat text file
with each record on one line, and each field separated by a '|'?

> Any one know of a simple app that will suffice?

No, but you could use some of the modules on CPAN,
http://www.perl.com/CPAN.

Have a look at the Sprite module

NAME
     Sprite - Module to manipulate text delimited databases using
     SQL.

There are ways of asking for passwords, and checking them. See the
various perl faqs for possibilities.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 75% of the people make up 3/4 of the
Commercial Dynamics Pty. Ltd.       | population.
NSW, Australia                      | 


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

Date: Thu, 10 Dec 1998 01:33:16 GMT
From: jira@my-dejanews.com
Subject: PELRSHOP - not recognising SSI
Message-Id: <74n8ct$72t$1@nnrp1.dejanews.com>

I'm trying to set up SSI tags in my catalog pages for perlshop. However it
seems perlshop doesn't seem recongise my SSI tags while processing the
catalog pages for return to the browser. The SSI tag i am using is
<!--#include file="filename.txt"--> the code i have isolated from perlshop
which is supposed to recognise the tag is below and set off the approruiate
subroutine is below. I'm afraid my knowledge of perl is insufficient to fully
understand the code though I know roughly whats its doing - Anyone have any
experience with SSI in perlshop or can identify if any problems with code
below


if (
/\<!\-\-\#(include|fsize|flastmod|config|echo|exec)\s+(file|virtual|errmsg|si
zef mt|timefmt|var|cmd|cgi)\s*\=\s*\"(.*?)\" \-\-\>/i ) 		     
	{&process_ssi;}


Cheers Roger

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 10 Dec 1998 03:41:43 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Perl glob one-liner problem on Win95
Message-Id: <slrn76uh94.7vg.randy@theory.uwinnipeg.ca>

On Tue, 08 Dec 1998 21:20:48 GMT, 
	maneri@my-dejanews.com <maneri@my-dejanews.com> wrote:
>I just upgraded my win32 perl to version 5.004_02 and can no longer do a one-
>liner such as
>perl -pi.bak -e "s/1/2/" *.out
>without getting a
>"Can't open *.out: No such file or directory" message.
>This worked fine before. I've also tried both Win32 ports (ActiveState+the
>other one). Anyone else had this problem?

Hi,
   I'm using a Win32 perl based on 5.005_02, and the above works
fine. Perhaps if you upgraded to the latest ActiveState build,
also based on 5.005_02, it would work. You might also check out the
Win32 READMEs in the source distribution for a discussion of
globbing with Win32.
-- 
		best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Wed, 09 Dec 1998 21:40:48 -0600
From: Jeremy Simmons <jeremys@piocon.com>
Subject: Re: Perl, ORacle & Linux
Message-Id: <366F42C0.BFAB60AF@piocon.com>

It is a simple process, you need Oracle SQL*NET setup on both machines (This is
distributed with the Oracle 8.05 for Linux). The NT machine should be running the
SQL*NET server with the TNS Listener process running. On the Linux machine setup
SQL*NET client (once installed you can test the connection with the TNSPING
utility). Then make a version of perl for the Linux box that includes the OraPerl
libraries.  Follow the OraPerl API to write your code and you will be able to
access any Oracle Database you setup.

Unfortunately, this does require some fairly in-depth Oracle experience.

brewer@avanticorp.com wrote:

> I can say that finding information on Oracle, Linux, and Perl is not easy.  I
> have spent most of the day looking myself.
>
> My problem is as follows.  I'm setting up a WebServer on linux.  We want cgi
> programs on the webserver to be able to talk to an Oracle7 database on a
> Windows NT server.  I keep reading and being told I need sql*net for the perl
> to oracle part of the problem.  Does sql*net exist for Linux?  What are these
> "oracle libraries" I need to compile/link against to get part of the perl
> interface working?
>
> I can't believe I'm the first person to want to does this, someone else must
> have tackled this problem before me.  (I base that on the popularity of
> Apache, Perl, Linux, and Oracle!)
>
> If you send e-mail please send to noble@pagesz.net
>
> THanks for any help....
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



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

Date: Thu, 10 Dec 1998 01:18:58 GMT
From: jira@my-dejanews.com
Subject: Re: Perlshop Customization Questions
Message-Id: <74n7i1$67r$1@nnrp1.dejanews.com>



> >
> > 2. Adding a "Back to Homepage" button to the order confirmation page. It's a
> > dead end, the user can't do anything from there.
> [snip]
>
I have done this - it is no problem just find the portion of the script which
writes the confirmation order to the browser and edit it to print out the html
code for the apropriate button

Cheers ROGER

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 9 Dec 1998 19:09:20 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: reading comma delimited data files
Message-Id: <007n47.dj7.ln@magna.metronet.com>

Rick Delaney (rick.delaney@home.com) wrote:
: Cybernetic Bear wrote:

: > which looks basically like this:
: > name, date, number-value

:     my ($name, $date, $number_value) = split /,/;


   my ($name, $date, $number_value) = split /,\s*/;

   Unless you _want_ leading spaces in the fields.

   ;-)


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


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

Date: 10 Dec 1998 01:11:07 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Regular Expression:  Irregular spacing in email message
Message-Id: <74n73b$if3$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Larry Rosler
<lr@hpl.hp.com>],
who wrote in article <MPG.10d8b27d4e1bd63e9898ba@nntp.hpl.hp.com>:
> 'If there is no \n at the end of the line,' then it isn't a line, is it?
> 
> <> returns a 'line' from a 'text file'.  

No, <> returns a 'line' from a file.  This contradicts your
(mis)definition of a line.

Ilya


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

Date: Thu, 10 Dec 1998 01:25:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Regular Expression:  Irregular spacing in email message
Message-Id: <SpFb2.125$jp4.275@nsw.nnrp.telstra.net>

In article <MPG.10d8b27d4e1bd63e9898ba@nntp.hpl.hp.com>,
	lr@hpl.hp.com (Larry Rosler) writes:

> <> returns a 'line' from a 'text file'.  A 'line' is a sequence of 
> characters terminated by a \n.

The last line of a file is not necessarily terminated by a \n.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | 'I hate gramaticle errors!' 'Me to!'
NSW, Australia                      | 


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

Date: Thu, 10 Dec 1998 01:47:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: TCL <-> PERL, what's better.
Message-Id: <3LFb2.131$jp4.275@nsw.nnrp.telstra.net>

In article <74mc1o$at4@mercury.adc.com>,
	bhilton@tsg.adc.com (Brand Hilton) writes:

> As for me, I used to do a lot of TCL work.  Sure beats C/Motif when
> you're doing GUIs.  But, as a language, Perl's so much more powerful

The gui stuff is Tk. There's also Tk for perl.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: Thu, 10 Dec 1998 01:43:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: win32 messages
Message-Id: <yHFb2.130$jp4.275@nsw.nnrp.telstra.net>

In article <74m24n$c0g@romeo.logica.co.uk>,
	"Navtej S Matharu" <MatharuN@Logica.com> writes:

> Can anyone tell me how to check for incoming SMTP messages through
> running a Perl script?? It has to run on Windows NT4.

I have no clue why you would want to do this, but...

write a script that listens on the SMTP socket.

The following documentation will tell you a lot about how to do that.
Once you have tried some things, and you can't get it to work, come
back, show us what you have, and we'll have a look at it.

# perldoc perlipc
# perldoc Socket

You can possibly also find some modules on CPAn that could help you:
http://www.perl.com/CPAN/

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I think I think, therefore I think I
Commercial Dynamics Pty. Ltd.       | am.
NSW, Australia                      | 


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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