[12914] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 324 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 1 11:07:28 1999

Date: Sun, 1 Aug 1999 08:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 1 Aug 1999     Volume: 9 Number: 324

Today's topics:
    Re: $/ for cross platform text files? <clint@drtech.co.uk>
    Re: ? path to SendMail on NT ??? <mike@shupp.com>
    Re: Announcement: "CRAP" <gellyfish@gellyfish.com>
    Re: Beginner-friendly group as cultural adaptation? (I R A Darth Aggie)
    Re: Beginner-friendly group as cultural adaptation? (I R A Darth Aggie)
    Re: Confusion with the Schwartzian Transform used in so (brian d foy)
    Re: Confusion with the Schwartzian Transform used in so (Larry Rosler)
    Re: Does anyone know how to create a CGI program for Mu (Bart Lateur)
    Re: Getting the Win32::API module to work (Reini Urban)
        How do I set up samba <rvdd@iafrica.com>
    Re: How to compare two files and get the differences ? <factory@factory.co.kr>
        How to pass hash to object and make it member data? <ramanika@flashmail.com>
    Re: How to pass hash to object and make it member data? (Anno Siegel)
    Re: How to read the submit button as a name or value <tchrist@mox.perl.com>
    Re: How to read the submit button as a name or value (Paul J. Schinder)
    Re: Installing Perl Modules (I R A Darth Aggie)
        mail check via web <tdm@dmw.it>
    Re: Newbie Q: How to check if invoked as CGI program <kin@0011.com>
        newbie: perl finger/perl books <makhan@students.uiuc.edu>
        Paasing Arguments to System Function (paul)
        Paasing Arguments to System Function (paul)
    Re: pipes vs csv (Bart Lateur)
    Re: reg expression (r j huntington)
    Re: Using perl to ftp non interactively (r j huntington)
    Re: Why won't this little script work? (Jon Bell)
    Re: Win32: how to get OLE object from CLSID (Jan Dubois)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sun, 1 Aug 1999 15:13:13 +0100
From: "Clinton Gormley" <clint@drtech.co.uk>
Subject: Re: $/ for cross platform text files?
Message-Id: <7o1khl$35b$1@taliesin.netcom.net.uk>

This probably isn't much use, but I have previously read a discussion on the
way that UNIX vs Windows vs Macs handle CRs, and I'm pretty sure it's in the
perldocs somewhere, but I have been unable to find it.

For instance, in Windows, even if you specifically print just a char(13) to
a file, it records it as 13/10 (if I remember correctly - I may be way off
track)

Anyway, the point is that this is one muddled up subject! Good luck.

Of course, you could always define some completely arbitrary line-ending
like "thisIsTheEndOfLikeOK" if the only place you need to access the text
file is through your own program.

Clint

Asher <asher@localhost.localdomain> wrote in message
news:slrn7q7ka3.vd.asher@localhost.localdomain...
> On Fri, 30 Jul 1999 10:18:26 +0100, Rolf Howarth <rolf@parallax.co.uk>
wrote:
> >What's the easiest way to process a text file a line at a time if you
> >don't know in advance whether it's DOS (\r\n), Unix (\n) or Macintosh
> >(\r) format?
> >
> >DOS and Unix is easy, set the input record separator $/ to \n and remove
> >any trailing \r's, but if your script encounters a Mac file then it will
> >read the entire file in one go.
> >
> >I keep thinking this ought to be trivially easy (even the default
> >behaviour of $/ if you don't set it to anything else), but can't think
> >of any way of doing it without reading the file twice (the first time to
> >identify it's type), reading it a character at a time and splitting it
> >into lines myself, or slurping it all into memory and then splitting it,
> >none of which are ideal. The file might be huge, so efficiency is
> >important. Am I missing something obvious?
> >
> >-Rolf
> You could try something like this: (Not Tested)
>
> open(IF,"foo") || die"Can't read file: $!";
> read(IF,$a,30,length($a)) while($a !~ /[^\r\n]([\r\n])+[^\r\n]/);
> $/ = $1;
> seek(IF,0,0);
>
> Assumption:
> Since it's a text file, it contains no \r or \n except as line separators.
>
> I suspect there's a better way.




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

Date: Sat, 31 Jul 1999 17:02:46 -0400
From: Mike Shupp <mike@shupp.com>
Subject: Re: ? path to SendMail on NT ???
Message-Id: <37A36474.BCCE5F3A@shupp.com>

> How are you invoking sendmail? Most of the scripts I've seen do it thusly:
>
> open(MAIL,'|/usr/lib/sendmail -ot'); # untested, from memory
>
> When this sort of open fails, it doesn't cause an error. Try:
>
> open(MAIL,'|/usr/lib/sendmail -ot') or die "sendmail: $!";

(thank you for the help!  no luck yet...)

currently invoking sendmail by:
        open(MAIL,"|$mailprog -t");

(with this variable defined at the head of the script)
        $mailprog = '/usr/bin/sendmail';





--
________________________________________
Mike Shupp  e-mail: mike@shupp.com
tel: (703) 536-4222  fax: (209) 633-5075
web:  http://www.shupp.com




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

Date: 31 Jul 1999 23:54:55 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Announcement: "CRAP"
Message-Id: <7o02cf$2gv$1@gellyfish.btinternet.com>

On 31 Jul 1999 09:24:11 -0700 Tom Christiansen wrote:
>      [courtesy cc of this posting mailed to cited author]
> 
> In comp.lang.perl.misc, japhy+crap@pobox.com writes:
> :WHAT IS CRAP?
> :    Have you seen a program written by someone else, and sighed,
> :    saying:
> 
> Does this mean that you're going to attack that festering hellhole
> of eternal damnation known as "Matt's Script Archive"?  If so, hurray.
> 

Unfortunately there are a thousand forgotten festering hellholes out there.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 31 Jul 1999 21:07:46 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <slrn7q6pha.65l.fl_aggie@thepentagon.com>

On Fri, 30 Jul 1999 22:42:55 +0100, Andrew Fry
<andrewf@beausys.demon.co.uk>, in
<c3AIoAAfxho3EwUJ@beausys.demon.co.uk> wrote:

[about the immense amount of documentation]

+ If I had to read these,

You don't. You just need to know where they are, and how to use them
effectively. Things like 'grep' and 'perlindex' are your friends.

+ I am just saying that us newbies are under time pressures also, and

Then Usenet should be the *last* place to look for help.

+ we dont always have the luxury of time to plough through manuals (even
+ if we knew our way around them!).

Then you should become more profficient with your search tools...plowing
is so passe.

James - I won't even mention perld*c...



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

Date: 31 Jul 1999 21:12:01 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <slrn7q6pp8.65l.fl_aggie@thepentagon.com>

On Sat, 31 Jul 1999 13:27:34 +0100, Andrew Fry <andrewf@beausys.demon.co.uk>, in
<Coq$PGA2uuo3EwH8@beausys.freeserve.co.uk> wrote:
+ In article <37a2df51@cs.colorado.edu>, Tom Christiansen
+ <tchrist@mox.perl.com> writes
+ >     [courtesy cc of this posting mailed to cited author]
+ >
+ >In comp.lang.perl.misc, 
+ >    Andrew Fry <andrewf@beausys.demon.co.uk> writes:
+ >:BTW. I am *NOT* for one moment suggesting that it is never worth reading
+ >:the FAQ and documentation. I am just saying that us newbies are under
+ >:time pressures also, and we dont always have the luxury of time to
+ >:plough through manuals (even if we knew our way around them!).
+ >
+ >If one cannot learn to use fast text searching programs and techniques
+ >for the documents on one's very own system, I suspect that one has other
+ >crippling disabilities as well and will consequently never amount to
+ >much of a success in this field.

+ How very patronising.

Which is worse: depending on the generosity of strangers, or learning to
be more effective with what you've got where you're at?

grep and perlindex are your friends. So are the Table of Contents and
the Indices in the books that you own. And they'll come thru for you
in situations where you don't _have_ access to the 'net.

James


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

Date: Sun, 01 Aug 1999 07:36:37 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Confusion with the Schwartzian Transform used in sorting
Message-Id: <brian-0108990736370001@1cust54.tnt1.durham.nc.da.uu.net>

In article <rq7tbbc0v4cq6@corp.supernews.com>, "meteorman"
<twade@nobmispam.net> wrote:

>I am confused on how to code the above Transform properly.  Once sorted, how
>do I programmatically replace the original file with the newly sorted data?

rename the original file.

write the sorted data to a file with the same name as the original.  

this has nothing to do with the Schwartzian Transform.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Sun, 1 Aug 1999 07:04:55 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Confusion with the Schwartzian Transform used in sorting
Message-Id: <MPG.120df3dd2abd4bad989d88@nntp.hpl.hp.com>

In article <rq7tbbc0v4cq6@corp.supernews.com> on Sun, 1 Aug 1999 
00:21:13 -0700, meteorman <twade@nobmispam.net> says...
> I am confused on how to code the above Transform properly.  Once sorted, how
> do I programmatically replace the original file with the newly sorted data?
> Any help would be greatly appreciated.
> 
> A sample of the LIST file follows:
> 
> ////////////////////
> # file needing sorted alphabetically
> Iron Mountain,spot1.html
> Badger Butte,spot2.html
> Anthony Lakes,spot3.html
> 
> The following is the code I have so far.  Basically, I want to sort on the
> first key (e.g., Iron Mountain), and keep the whole lines intact once
> sorting is complete.  Will the below code work?

You couldn't have tried it.  How can it work if it doesn't even compile?

> ///////////////////////
> # sort.pl

No '-w'.  No 'use strict;'.

> open LIST, ">c:\temp\fws_list";

Does the filename really have a tab character and a formfeed character 
in it?  This is surely one of the most seductive traps in Windows/DOS 
Perl, judging by the number of times it appears here.  Solutions (in 
increasing order of desirability):

Use double backslashes where you want a backslash within double-quotes.
Use single-quotes when there is no interpolation required.
Use forward slashes for directory separators. (The Best-Kept Secret)

Had you bothered to check the results of the 'open', that would have 
been clear.  ALWAYS check!!!  But then you never actually tried to run 
this code, so what difference would that have made?

  $outfile = 'c:/temp/fws_list';
  open LIST ">$outfile" or die "Couldn't open '$outfile'. $!\n";
 
> @by_spotname =
>   map { $_->[1] }
>   print $_;

I assume that line is some misplaced debugging attempt.

>   sort { $a->[0] cmp $b->[0] }
>   map { [$_, (split /,/)[0]] }
>   <LIST>;

So now you are reading the data from the empty output file?

As for the sorting problem itself, you are very close.  Look again at 
which of the array elements is which -- which one you want to compare 
on, and which one preserves the original data.

> # once sorted how do I replace the original file with the sorted list?

brian d foy has already answered that.

 ... 

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


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

Date: Sun, 01 Aug 1999 11:22:01 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Does anyone know how to create a CGI program for Multiple Choice test using Perl on website?
Message-Id: <37a42d8a.961352@news.skynet.be>

Abigail wrote:

>Your program should have a beginning, a middle and an end.

>Here's the end:
>
>    __END__

That part is merely optional.

	Bart.


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

Date: Sat, 31 Jul 1999 21:57:13 GMT
From: rurban@xarch.tu-graz.ac.at (Reini Urban)
Subject: Re: Getting the Win32::API module to work
Message-Id: <37a37013.217622684@judy.x-ray.local>

"Sam Weatherhead" <sweather@fastenal.com> wrote:
>Any Suggestions are appreciated.

Get Aldi and some other Win32 module writers to provide Makemaker
install scripts. This would solve most of our problems with Win32.

however Win32::API is really nice! I could use his (better Andrea
Frosini's) assembler trick a lot in my lisp projects! cudos to andrea.
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html


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

Date: Sun, 1 Aug 1999 14:35:44 +0200
From: "Romiko" <rvdd@iafrica.com>
Subject: How do I set up samba
Message-Id: <7o1fbs$21pi$1@nnrp01.ops.uunet.co.za>

I need NT to access Linux Redhat and vica verca, how do I set it up.




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

Date: Mon, 2 Aug 1999 00:11:56 +0900
From: "Yeong Mo/Director Hana co." <factory@factory.co.kr>
Subject: Re: How to compare two files and get the differences ?
Message-Id: <7o1nhu$obh$1@news1.kornet.net>

Let's guess
aaa.txt has the following lines;
f1, 123, .........
f2, 222, .........
f3, 5555, .......
f4, xxx, ........
 ....................

and bbb.txt has the following lines;
f2, 222, ...........
f3, 5555, .........
 ......................

There is a line including "123" or "xxx"($category) at aaa.txt, but there is
no line including "123" or "xxx" at bbb.txt
in this case, I want to out put "123" and "xxx".
Of course "123" and "xxx" are just an example.
It could be something else, and many...

I hope I explained enough.
Thank you in advance.
Abigail ÀÌ(°¡) ¸Þ½ÃÁö¿¡¼­ ÀÛ¼ºÇÏ¿´½À´Ï´Ù...
>Yeong Mo/Director Hana co. (factory@factory.co.kr) wrote on MMCLIX
>September MCMXCIII in <URL:news:7ntb8i$igf$1@news1.kornet.net>:
>--
>-- There are lines at aaa.txt and bbb.txt as following;
>-- ($f1, $category, $f2, $f3, $f4, $f5, $f6, $f7) = split ('\|', $lines);
>--
>-- If aaa.txt has $category=123, and bbb.txt doesn't have $category=123,
>-- How can I compare two files and get the value of 123 ?
>
>
>I don't understand the question. It seems to me you already have the
>value 123.
>
>
>
>Abigail
>--
>%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)
((.)
>(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of
Hanoi
>
>
>  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
>   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
>------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers
==-----




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

Date: Sun, 01 Aug 1999 03:40:08 +0100
From: Ramanika <ramanika@flashmail.com>
Subject: How to pass hash to object and make it member data?
Message-Id: <37A3B387.914CF0A9@flashmail.com>

here is what I am trying to do but cannot get it to work.  I have 2
files.  user.pm and user.pl.

I need to create an object that can be passed data via a hash and make
the hash it's member data.
The object may also change the values of the original hash that it was
passed.

Any ideas on how to do this?  This is what I am trying but it does not
work.  The object is in package user.pm

-- file: user.pm
package user;

# create a new user based on a hash reference passed in
sub new {

 # make the passed in data member data
 my ($m_student) = @_;
 print "user::new()";

 # print the value of user_id passed in
 print "user_id = $m_student->{'user_id'}";

 # not sure why this package needs to know that my data is my data
 # why is bless really needed?
 bless $m_student;
}
1;

-- file: user.pl
#!/usr/bin/perl -w
use user;

# create a hash to pass when creating object
%r_student = {
 "user_id" => 20,
 "user_password" => "secret"
};

# pass in hash to create object and fill member data
# the object should be able to change the data of r_student
$student = user::new(\%r_student);



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

Date: 1 Aug 1999 14:52:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to pass hash to object and make it member data?
Message-Id: <7o1mv7$62p$1@lublin.zrz.tu-berlin.de>

Ramanika  <ramanika@flashmail.com> wrote in comp.lang.perl.misc:
>here is what I am trying to do but cannot get it to work.  I have 2
>files.  user.pm and user.pl.
>
>I need to create an object that can be passed data via a hash and make
>the hash it's member data.
>The object may also change the values of the original hash that it was
>passed.
>
>Any ideas on how to do this?  This is what I am trying but it does not
>work.  The object is in package user.pm

Arrrgh... I've really come to loathe this little appendix "it doesn't
work" that dangles from too may questions.  *What* doesn't work?
Changing the values of the original hash?  But there is no code that
attempts to do that?  Then what?  Do you get an error message?  No.
Warnings?  Yes, one of them is "Reference found where even-sized list
expected at...".)  Why don't you say so?  Do you expect us to run or
eye-parse your code to see what's wrong?

You want help from the group, so the least thing you can do is to make
it as easy as possible for us to give help.  "It doesn't work" just
doesn't cut it.

>-- file: user.pm
>package user;
>
># create a new user based on a hash reference passed in
>sub new {
>
> # make the passed in data member data
> my ($m_student) = @_;
> print "user::new()";

Apparently your new constructor expects the user to pass it a reference
to a hash.  Since you want your class to contain methods that change
the data in an object, this is probably not what you really want, though
there is no way to tell.  It is more customary to hand a bunch of data
to new and have it construct the object itself.  That way changes in
the object data will not be reflected in the data the user provided.

> # print the value of user_id passed in
> print "user_id = $m_student->{'user_id'}";
>
> # not sure why this package needs to know that my data is my data
> # why is bless really needed?
> bless $m_student;

Bless tells the thingie (as the parlance is) pointed to by $m_student
that it is now an object in class user.  This enables method calls
via the arrow syntax, ala $student->password().  Of course, since
you haven't defined such methods yet, the difference is small at
this stage.

>}
>1;
>
>-- file: user.pl
>#!/usr/bin/perl -w
>use user;
>
># create a hash to pass when creating object
>%r_student = {
> "user_id" => 20,
> "user_password" => "secret"
>};

You seem to be confused about when to supply a reference and when
to supply the real thing.  %r_student wants a hash assigned to it,
but what you give it ( { ... } ) is a *reference* to an anonymous
hash.  Not the same thing, hence the warning.  You probably want
(...) instead of the curlies, but it's hard to tell.  It gets worse:

># pass in hash to create object and fill member data
># the object should be able to change the data of r_student
>$student = user::new(\%r_student);

Your comment says "pass in hash", but what you are passing is a
reference to a reference to a hash.  The code in new doesn't reflect
that.  I give up at this point.

Anno


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

Date: 1 Aug 1999 06:19:40 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to read the submit button as a name or value
Message-Id: <37a43b5c@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    bart.lateur@skynet.be (Bart Lateur) writes:
:'comment' => <<'END_OF_FUNC',
:sub comment {
:    my($self,@p) = self_or_CGI(@_);
:    return "<!-- @p -->";
:}
:END_OF_FUNC
:
:A "dirty hack" is a my name for it.

It's a shame Perl permits such "dirty hacks".  Otherwise 
you would all be more content with things running slowly.

--tom
-- 
"I discount everything Djikstra has to say because he doesn't actually
run his programs" --Rob Pike, On Djikstra's belief that bugs in your
program are a moral failure to prove your program mathematically correct.


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

Date: Sun, 01 Aug 1999 13:53:38 GMT
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: How to read the submit button as a name or value
Message-Id: <CjYo3.460$hC5.24639@iad-read.news.verio.net>

In <slrn7q87pn.ioj.abigail@alexandra.delanet.com> abigail@delanet.com (Abigail) writes:



>But, AFAIK, the CPAN testers group isn't doing quality control. They just
>test whether a module can be installed (including running make test) on
>various platforms.

That's exactly right.  When I'm testing for cpan-testers, I frequently
don't even look at the README, let alone the code.  The only time I
look at the code itself is if something goes wrong.  We make no
guarantees about code quality or suitability for a given task.  All a
"PASS" means is that the package unpacked, built, and passed the
author's tests without any discernable problems.



>Abigail
>-- 
>sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
>f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
>f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))


>  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
>   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
>------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----

--
Paul J. Schinder 
NASA Goddard Space Flight Center 
schinder@leprss.gsfc.nasa.gov 


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

Date: 31 Jul 1999 21:21:19 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Installing Perl Modules
Message-Id: <slrn7q6qan.65l.fl_aggie@thepentagon.com>

On Sun, 1 Aug 1999 04:24:18 +1000, Kim Saunders <kims@emmerce.com.au>, in
<933445484.397360@draal.apex.net.au> wrote:

+ Is there any way that I can tell it where I want them? (like in home dir if
+ you don't have root access), other than manually copying them to the right
+ place?

perlfaq8: How do I install a CPAN module?
perlfaq8: How do I keep my own module/library directory?
perlfaq8: How do I add the directory my program lives in to the
          module/library search path?

James


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

Date: Sat, 31 Jul 1999 18:31:32 +0200
From: Graziano Poretti <tdm@dmw.it>
Subject: mail check via web
Message-Id: <37A324E4.B80B53F@dmw.it>

hi to everybody

I'm looking for a freeware perl script allowing me to check emails from
a webpage (see objects, senders ... and the possibility to delete them
before dnload the messages). Useful to avoid spam, loooong not requested
attachment and so on

do you know where to find it on the Net?

thanks for your time

--
Graziano Poretti




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

Date: Sun, 01 Aug 1999 06:39:18 -0700
From: Kin Lum <kin@0011.com>
Subject: Re: Newbie Q: How to check if invoked as CGI program
Message-Id: <37A44E06.E2E82405@0011.com>

> >Check out the contents of %ENV in both cases.
> 
> And what would I expect to find ?

you can use $ENV{"REMOTE_HOST"}
it is not defined if running from terminal.

see other variables:
http://www.0011.com/bin/try

here are some good references with CGI using Perl:
http://www.0011.com/books/perl

among the best ones for CGI/Perl:

	Cgi Programming With Perl 
        Perl and Cgi for the World Wide Web: Visual Quickstart Guide
        Learning Perl (2nd Edition) 
        Effective Perl Programming: Writing Better Programs With Perl 

for the first one, the new edition might not be available yet, 
but the old edition is probably still in bookstores.  
it has a different title

	CGI Programming on the World Wide Web

but the same cover.


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

Date: Sun, 1 Aug 1999 07:09:09 -0500
From: ":)" <makhan@students.uiuc.edu>
Subject: newbie: perl finger/perl books
Message-Id: <Pine.GSO.4.10.9908010706040.22997-100000@ux4.cso.uiuc.edu>


Peace,

Is there any way I can find out who (login name, time, date) is fingering
my login name?  The system I use uses UNIX(r) System V Release 4.0.

Also what books would you recomend for learning Perl.



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

Date: Sun, 01 Aug 1999 14:22:06 GMT
From: paul@balans.net (paul)
Subject: Paasing Arguments to System Function
Message-Id: <37a4570b.1515791@news.wxs.nl>

Hello,

I'm getting a bit angry avout this one because i do not see the
mistake i'm making.

$test = 'perl  \\query\\query1.cgi';
$uitkomst = `$test "FileNaam=test.txt"`;

I'm trying to run query1.cgi with the the variable FileNaam filled
with test.txt.

When i try to do it the correct way ??
system("perl","\\query\\query1.cgi","FileNaam=test.txt);

I'm using active perl.

How do i pass FileNaam to the script ???
Everytime FileNaam = Empty !!!!

Please help

Thanks,

Paul



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

Date: Sun, 01 Aug 1999 14:23:59 GMT
From: paul@balans.net (paul)
Subject: Paasing Arguments to System Function
Message-Id: <37a4587b.1883576@news.wxs.nl>

Hello,

I'm getting a bit angry avout this one because i do not see the
mistake i'm making.

$test = 'perl  \\query\\query1.cgi';
$uitkomst = `$test "FileNaam=test.txt"`;

I'm trying to run query1.cgi with the the variable FileNaam filled
with test.txt.

When i try to do it the correct way ??
system("perl","\\query\\query1.cgi","FileNaam=test.txt);

I'm using active perl.

How do i pass FileNaam to the script ???
Everytime FileNaam = Empty !!!!

Please help

Thanks,

Paul



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

Date: Sat, 31 Jul 1999 21:38:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: pipes vs csv
Message-Id: <37a36c56.787404@news.skynet.be>

<joeyandsherry@mindspring.com> wrote:

>Is there an advantage or disadvantage of using pipes versus commas as field
>delimiters in flat text files? I have been successfully using commas, but
>have run into a few problems here and there, and was thinking that pipes
>would eliminate this potential.

Can your data contain pipes? Unlikely. Can it contain comma's? Likely.

BTW the tab character ("\t", chr(9)) is often used as an alternative,
and provided that your data MAY NOT contain tabs (or newlines), it is
pretty reliable.

	Bart.


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

Date: Sun, 01 Aug 1999 14:09:30 GMT
From: wolph@nycap.rr.com (r j huntington)
Subject: Re: reg expression
Message-Id: <uyYo3.1053$ua.36292@typhoon.nyroc.rr.com>

>I have read this thread and come to the conclusion that you really can't
>see the obvious can you.

More insults.

>The reason why Abigail, Tad, Tom, Larry, Uri and many others who have been
>here for years jump in with varying degrees of "rudeness" is simply for
>self preservation and the good of Perl. If they do what you propose a faq
>doesn't get answered corectly so some well meaning not-so-newbie comes
>along and says "oh good one I can answer". They then proceed to answer,
>badly.

[snip]

So this is why it is necessary to INSULT the newbie querant? 
To preserve the sanctity of perl and protect everyone from
bad answers? Sorry, I don't buy that.



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

Date: Sun, 01 Aug 1999 14:40:04 GMT
From: wolph@nycap.rr.com (r j huntington)
Subject: Re: Using perl to ftp non interactively
Message-Id: <8%Yo3.1055$ua.36292@typhoon.nyroc.rr.com>

>> do you like reinventing wheels? other than the command line parsing
>> stuff, it could done far more simply using Net::FTP. and it would handle
>> all of the protocol not just the subset you wrote.
>
>He's doing it again Uri. Several people have already taken him to task
>this week but he doesn't seem to have groked the arguments.

Well, I have to admit that no answer would have been better than
a mis-informed one.
			-=rjh=-



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

Date: Sun, 1 Aug 1999 14:47:26 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Why won't this little script work?
Message-Id: <FFsJr2.1C1@presby.edu>

 Tim  <bie@connect.ab.ca> wrote:
>This is a multi-part message in MIME format.

Please post as plain text only.  Many of of us out here use newsreading
software that doesn't decode attachments or HTML, and it's a waste of
network resources to transmit an HTML or encoded copy in addition to the
plain-text one.

>I have no idea why this won't work. everything looks right 2 me

What do you mean, "this won't work?"  What do you expect it to do, and
what does it actually do?  How are you trying to run it?  Etc.

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
        [     Information about newsgroups for beginners:     ]            
        [ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]


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

Date: Sun, 01 Aug 1999 13:35:22 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Win32: how to get OLE object from CLSID
Message-Id: <37a82b34.15133871@news3.ibm.net>

[mailed & posted]

Rodney Schuler <u233@my-deja.com> wrote:

>I am trying to drive two different versions of an application, so I
>cannot use the normal OLE class name "MSDEV.APPLICATION", as that has
>different CLSID's associated with it depending on which version I
>installed most recently.  I know the CLSID's for the two versions of
>"MSDEV.APPLICATION" that I which to drive, but I don't know how to
>create instances given just the CLSID.

It should be possible to specify the exact version of the class by
appending the version number to the progid:

    my $obj = Win32::OLE->new('MSDEV.APPLICATION.6');

It should also be possible to just use a CLSID in place of the PROGID.
Win32::OLE assumes a PROGID if the first character is alpha, and CLSID
otherwise.  I don't know if you have to specify the brackets around the
clsid or not; you have to experiment yourself.  Cut'n paste of CLSID from
the registry should work (I hope).

-Jan


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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


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