[12532] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6132 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 25 23:07:15 1999

Date: Fri, 25 Jun 99 20:00:19 -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           Fri, 25 Jun 1999     Volume: 8 Number: 6132

Today's topics:
    Re: "Slurping" a .jpg file (Larry Rosler)
    Re: 'tr/ / /s; myfile.txt won't work (Ronald J Kimball)
        ACL access okurios@my-deja.com
    Re: Backsniffing <rootbeer@redcat.com>
    Re: Beginner's Question (Ronald J Kimball)
    Re: CGI.pm, hashes, passing by reference and two differ (Ronald J Kimball)
    Re: CGI.pm, hashes, passing by reference and two differ <rootbeer@redcat.com>
    Re: CGI.pm: submit + image? (Ronald J Kimball)
        FAQs and attitudes (was Re: How can I read a whole file (Ronald J Kimball)
    Re: faqs, beginner question (J. Moreno)
    Re: formatting text in email <rick.delaney@home.com>
    Re: global vars <rick.delaney@home.com>
    Re: HELP: Can't delete ONE stinking file with Unlink! (Ronald J Kimball)
    Re: How do I do this? (Larry Rosler)
    Re: Looking for very small, basic bulletin board system (Ronald J Kimball)
    Re: PB Opening word file with perl...Win32::OLE (Ronald J Kimball)
    Re: Perl Alphanumeric Sort? (Ronald J Kimball)
    Re: Regex question (i think) <rootbeer@redcat.com>
        SELECT(rbits,wbits,ebits,timeout) adds blank line to fi pgodkin@my-deja.com
    Re: SELECT(rbits,wbits,ebits,timeout) adds blank line t <rootbeer@redcat.com>
    Re: simple question. (Ronald J Kimball)
    Re: Testing Perl scripts on Win 95/98/NT; and CGI too! <thestarman@NOSPAM.com>
    Re: Unix CGI > Win/Mac (Thomas Fischer)
    Re: URL <lane@rettig.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 25 Jun 1999 17:56:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: "Slurping" a .jpg file
Message-Id: <MPG.11ddc53427b7f7ec989c4d@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <01bebf6c$26ca06e0$c5dfffcc@upstairs> on 26 Jun 1999 00:38:15 
GMT, Rich Campbell <rcampbel@gbtech.net> says...
> I want to modify some of the internal stuff in a ".jpg" file:
 ...
> open(FD, "picture.jpg");

I assume you are sure this succeeded.  Why?  Always test ...

> undef $/;
> 
> $file = <FD>; 
> 
> but no go (but it works fine for a .txt file)

X-Newsreader: Microsoft Internet News 4.70.1161

perldoc -f binmode 

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


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

Date: Fri, 25 Jun 1999 22:31:20 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: 'tr/ / /s; myfile.txt won't work
Message-Id: <1dtz21e.w2c7dw1t378bgN@p41.tc2.metro.ma.tiac.com>

<j_a_p@my-deja.com> wrote:

> I need to remove all of these spaces.  I tried using
> perl -ne 'tr/ / /s;' myfile.txt, but this isn't working. Does anyone
> know what I am doing wrong?

Even if you follow the previous advice and replace the tr/ / /s with
s/:: +/::/g, your code still won't work.

perl -ne 'tr/ / /s;' myfile.txt

reads in myfile.txt one line at a time, squashes spaces in memory, and
then exits.  It makes no changes to the contents of myfile.txt; in fact,
it doesn't even output anything.

I believe you need to spend some more time with the perlrun
documentation, particularly the parts about -p and -i.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'


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

Date: Sat, 26 Jun 1999 02:08:29 GMT
From: okurios@my-deja.com
Subject: ACL access
Message-Id: <7l1cmp$l99$1@nnrp1.deja.com>

Does anyone know how to access the ACL's under Solaris 7 from perl?  I
could not find anything at CPAN.

keith


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 25 Jun 1999 19:12:27 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Backsniffing
Message-Id: <Pine.GSO.4.02A.9906251910580.2676-100000@user2.teleport.com>

On Fri, 25 Jun 1999, Chris wrote:

> Can anyone tell me how to find out what URL a visitor to my page
> visited before coming to mine?

Maybe the visitor could. But I think you're thinking about the
HTTP_REFERER. See the docs, FAQs, and newsgroups about the Common Gateway
Interface (CGI) for more information on this environment variable. Do you
already know how to find these things? Good luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 25 Jun 1999 22:31:21 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Beginner's Question
Message-Id: <1dtz2cg.5bwq5uwtbznkN@p41.tc2.metro.ma.tiac.com>

Erik Denkers <edenkers@ktis.net> wrote:

> I understand how to define/create scalar variables/arrays.  I understand how
> to define/create references to variables/arrays.  Why would you create and
> use
> references when you could just call the variable by it's original name?

Here are a couple reasons that I don't think have been mentioned yet...


You can't pass arrays and hashes to subroutines, only lists of scalars:

sub foo {
  my($array_ref, $hash_ref) = @_;

  print "Array has ", scalar @$array_ref, " elements\n",
        "Hash has ", scalar keys %$hash_ref, "keys.\n";
}

@array = (1..10);
%hash = qw(a 1 b 2 c 3);

foo(@array, %hash);


You can create a reference to any one of several arrays/hashes/etc., as
needed, and use it later on to access the appropriate array.  You could
copy the appropriate array to another array, but that uses more memory,
and doesn't let you modify the original array, should you want to.

if (some_condition()) {
  $animals = \@dogs;
} elsif (other_condition()) {
  $animals = \@cats;
} else {
  $animals = \@birds;
}

$i = 0;
foreach (@$animals) {
  print ++$i, ".\t$_\n";
}

[You can do something similar with references to subroutines - perhaps
make a lookup table of code to call in various states...]



-- 
#!/usr/bin/sh -- chipmunk (aka Ronald J Kimball)
      perl -e'for(sort keys%main::){print if $$_ eq 1}
            ' -s  -- -' Just' -' another ' -'Perl ' -'hacker 
' http://www.tiac.net/users/chipmunk/ [rjk@linguist.dartmouth.edu]


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

Date: Fri, 25 Jun 1999 22:31:22 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: CGI.pm, hashes, passing by reference and two different results?
Message-Id: <1dtz3qm.rka9jntrkysvN@p41.tc2.metro.ma.tiac.com>

John Warner <john.warner@tivoli.com> wrote:

> If I change the line
>             table({-border=>"none"},TR(td([@row]))),
> to
>             table({-border=>"none"},TR(td([\@row]))),
> 
> Both the browser and command line return:
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
> <HTML><HEAD><TITLE>Untitled Document</TITLE>
> </HEAD><BODY><TABLE
> BORDER="none"><TR><TD>ARRAY(0x10c57b8)</TD></TR></TABLE></BODY></HTML>
> 
> Does anyone have an idea what is happening here?

[\@row] is a reference to a reference to an array, but td() expects a
reference to an array.  Thus, it stringifies the inner reference, and
returns '<TD>ARRAY(0x10c57b8)</TD>'.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 19:18:29 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CGI.pm, hashes, passing by reference and two different results?
Message-Id: <Pine.GSO.4.02A.9906251914580.2676-100000@user2.teleport.com>

On Fri, 25 Jun 1999, John Warner wrote:

> #!/usr/local/bin/perl -w
> use strict; #Use for debugging

That comment is misleading. Use 'use strict' whether you're debugging or
not. You may wish to remove the -w once you're done with development,
though.

> open FH, "navbar.dat";

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
It'll probably tell you something informative. 

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 25 Jun 1999 22:31:23 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: CGI.pm: submit + image?
Message-Id: <1dtz3uq.1cv7xvx1ee088oN@p41.tc2.metro.ma.tiac.com>

Peter Bismuti <bismuti@cs.fsu.edu> wrote:

> This is very much a Perl questions, it is a CGI.pm question, are you
> familiar with CGI.pm?    

How many people have to tell you that this is not a Perl question before
you believe it?  More than two obviously...

Let's find out just how obtuse you are!


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 22:31:25 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: FAQs and attitudes (was Re: How can I read a whole file in one go ?)
Message-Id: <1dtz56o.8nrb0v1vj76rrN@p41.tc2.metro.ma.tiac.com>

Tom Christiansen <tchrist@mox.perl.com> wrote:

> % man perlfaq5
>  

>     This tiny but expedient solution is neat, clean, and portable to
>     all systems that you've bothered to install decent tools on,
>     even if you are a Prisoner of Bill. For those die-hards PoBs
>     who've paid their billtax and refuse to use the toolbox, or who
>     like writing complicated code for job security, you can of
>     course read the file manually.
> 

I hope that this is Tom's own private copy of the FAQs, and that terms
such as "Prisoner of Bill" and "billtax" are not actually present in
Perl's standard documentation, where they would be entirely
inappropriate.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 21:20:02 -0400
From: planb@newsreaders.com (J. Moreno)
Subject: Re: faqs, beginner question
Message-Id: <1dtz411.zk5fh21st578lN@roxboro0-0029.dyn.interpath.net>

Alan Tod Gillespie <agille@mail.msy.bellsouth.net> wrote:

> i'm brand new to perl.  upon reading the general introductory faqs, i
> noticed that the relationship between perl, c, and unix is not outwardly
> defined.  it seems to me from reading that perl is an extension of c,
> but i would like to understand the relationship better.  can anyone
> help?

As David says, good job on reading the FAQs.

But the short answer is -- perl stea,er borrows ideas from all of them
as well as from other sources but the long and short of it is that,
there isn't any relationship between them.

-- 
John Moreno


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

Date: Sat, 26 Jun 1999 02:38:49 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: formatting text in email
Message-Id: <37743CFD.54DF8B53@home.com>

[posted & mailed]

owlswell@my-deja.com wrote:
> 
> I have a multi-line text field to print so I want to use the '^'
> (caret) and '~~' (double tilde), like so:
> 
>    DESCRIPTION: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~

DESCRIPTION: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
             $description
             ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
             $description

The first line prints as much of $description as will fit and removes
the part printed from $description.  The second does the same thing but
will keep repeating the line until $description is empty.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 26 Jun 1999 02:18:51 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: global vars
Message-Id: <3774384E.44FA72C5@home.com>

[posted & mailed]

David Cassell wrote:
> 
> No.  If you use system() or exec() to run it, then it will
> run as a child process.

No.  exec'ed processes aren't children.  system() forks; exec() doesn't.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Fri, 25 Jun 1999 22:31:24 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: HELP: Can't delete ONE stinking file with Unlink!
Message-Id: <1dtz4pg.1rq4br31jg55xeN@p41.tc2.metro.ma.tiac.com>

<roberthp@my-deja.com> wrote:

> I think I'm in the right directory....  What confuses me about this is
> why I can open and get a directory listing but can't do the deletion of
> a file I'm listing as resident in the directory; you're probably right
> about the chdir, but it still confuses me (I'm new at this Perl
> thing....).

opendir() opens a handle to the directory.  However, it does *not* set
the current directory.  Even after an opendir(), your Perl script will
still be working on the same directory it was before.  Hence, you need
to either chdir() or specify the full path.

Consider if you did two opendir()s in a row, and then tried to unlink()
a file read from the first dirhandle...  If opendir() switched
directories on you, you'd be in trouble.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 17:48:45 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How do I do this?
Message-Id: <MPG.11ddc3483c3ac391989c4c@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <37741c6c.3016861@netnews.worldnet.att.net> on Sat, 26 Jun 
1999 00:29:09 GMT, emcmanus@worldnet.att.net <emcmanus@worldnet.att.net> 
says...
> I have read the FAQ and I'm still not able to get this right.

Good for you for reading the FAQ.  However, that wouldn't be a FAQ, just 
basic regex stuff.  Read perlre.

> I'm using the users IP address in a script, but what I'd 
> prefer is only using the first three values of the IP address.
> 
> Example:
> Using
> 151.204.202.20
> Want
> 151.204.202
> 
> I can't specify the number of characters to cut from the right 
> because that is different with each IP address.  When I 
> searched and replaced on the "." it did it on the first "."
> in the string and I didn't understand how to do the third instance
> of "." search and delete.

s/\.\d+$//;

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


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

Date: Fri, 25 Jun 1999 22:31:26 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Looking for very small, basic bulletin board system
Message-Id: <1dtz5i4.3mhuyz1n5k2glN@p41.tc2.metro.ma.tiac.com>

Rich Campbell <rcampbel@gbtech.net> wrote:

> heh heh - I think there's a "bot" on here that randomly answers questions
> with
> "try reading PerlFaqXXXX" 
> 
> you might try http://www.worldwidemart.com/scripts/wwwboard.shtml
> I've used it and customized it a little (it's sort of plain - but works
> great)
> 

Uh oh...  That's the URL for Matt's Script Archive, which is exactly
where David Cassell said *not* to go.  Matt's scripts are not looked
upon favorably here in the Perl newsgroups.  They tend to be buggy and
rather poorly written.  wwwboard, for example, reinvents the wheel of
unescaping form data, and contains an obvious Y2K error, among its other
problems.

Hence, David's advice to try anywhere other than Matt's Script Archive.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
      "Remember, Perl doesn't write bad programs; programmers do."


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

Date: Fri, 25 Jun 1999 22:31:28 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: PB Opening word file with perl...Win32::OLE
Message-Id: <1dtz6ej.1oqv5h7h019gfN@p41.tc2.metro.ma.tiac.com>

[posted and mailed]

Olivier Maas <olivier.maas@at-lci.com> wrote:

> $document=$application->Documents->Open("$fichier");

> $res=$document->SaveAs('c:\temp\testtest.txt',wdFormatText);

> the error message goes :
> Can't call method "SaveAs" on unblessed reference at assist.pl line
> 72...

You should always check the result when you open a file.

Even when opening a Word document through Win32::OLE.


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 22:31:30 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl Alphanumeric Sort?
Message-Id: <1dtz6i1.jvmhsh7ziwp7N@p41.tc2.metro.ma.tiac.com>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:

> >>>>> "Jason" == Jason Larke <jlarke@uu.net> writes:
> 
> Jason> @letter_nums = ("A4","A2","A1","A3");
> 
> You may want to use a dataset that includes both "A11" and "A2", like
> the original data.  In that case, yours fails, sorting A11 before A2.

Ah...  The original data *was* ("A4","A2","A1","A3").  Perhaps the
original poster should have used a dataset that included both "A11" and
"A2", to show the problem he was having.

On the other hand, the problem he described was "it ends up being just
the same as it was when it went in" which will only happen if the array
is already sorted, regardless of the data.

-- 
chipmunk (Ronald J Kimball) <rjk@linguist.dartmouth.edu>
perl -e 'print map chop, sort split shift, reverse shift
' 'j_' 'e._jP;_jr/_je=_jk{_jn*_j &_j :_j @_jr}_ja)_js$_j
~_jh]_jt,_jo+_jJ"_jr>_ju#_jt%_jl?_ja^_jc`_jh-_je|' -rjk-


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

Date: Fri, 25 Jun 1999 19:25:04 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Regex question (i think)
Message-Id: <Pine.GSO.4.02A.9906251922200.2676-100000@user2.teleport.com>

On Fri, 25 Jun 1999, Gene Dolgin wrote:

> You know, after all these responses, i sitill have no clue how to do
> it.

Have you looked at Mail::Internet yet to see whether it will
do what you need?

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 26 Jun 1999 01:22:31 GMT
From: pgodkin@my-deja.com
Subject: SELECT(rbits,wbits,ebits,timeout) adds blank line to file
Message-Id: <7l1a0f$khk$1@nnrp1.deja.com>

I am using the command:
  SELECT(undef, undef, undef, 60)
to implement a 60 second sleep within my perl
script. This command is causing an extra blank
line to appear in my STDOUT file which I do not
want. Any suggestions on how to avoid the
extra blank line problem?

I have found that the SLEEP 60 command causes a
Core dump so I am using the SELECT command as a
work-around.

Thanks.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 25 Jun 1999 19:37:26 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: SELECT(rbits,wbits,ebits,timeout) adds blank line to file
Message-Id: <Pine.GSO.4.02A.9906251934490.2676-100000@user2.teleport.com>

On Sat, 26 Jun 1999 pgodkin@my-deja.com wrote:

> I am using the command:
>   SELECT(undef, undef, undef, 60)

Maybe you mean select(). Perl is case sensitive, of course.

> to implement a 60 second sleep within my perl script. This command is
> causing an extra blank line to appear in my STDOUT file which I do not
> want.

Can you make a small (five lines) program which demonstrates this
behavior?

> I have found that the SLEEP 60 command causes a Core dump

Maybe you mean sleep(). That's not supposed to happen. Maybe your perl is
miscompiled. Did it pass all tests in 'make test' before 'make install'?

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 25 Jun 1999 22:31:31 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: simple question.
Message-Id: <1dtz73p.1e9pdir1gja2fqN@p41.tc2.metro.ma.tiac.com>

Bart Lateur <bart.lateur@skynet.be> wrote:

> If you try the same with print(), you MAY need a "+" sign, to avoid
> warnings. Let's see... Change the "two" line to:
> 
> print (...) interpreted as function at test.pl line 9.
> 
>     print ("Two\n"), return;
> 
> and now the output is:
> 
>   print (...) interpreted as function at test.pl line 9.
>   Before
>   One
>   Two
>   After
> 
> It now prints a "Two", but also a warning.
> 
>     print +("Two\n"), return;
> 
> Gives the same output without the warning.

I find that hard to believe.

If you add a +, then you've just defeated the purpose of adding the
parentheses in the first place, which was to keep return from being an
argument to print.


  #! perl -w
  print "Before\n";
  &test;
  print "After\n";

  sub test {
      print "One\n";
      print +("Two\n"), return;
      print "Three\n";
  }
__END__


That code prints out:

Before
One
After

*without* the "Two".


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Jun 1999 18:31:43 -0700
From: "The Starman" <thestarman@NOSPAM.com>
Subject: Re: Testing Perl scripts on Win 95/98/NT; and CGI too!
Message-Id: <P5Wc3.172$BK6.17030@news2.randori.com>

I just wanted to apologize to Tim Greer (and anyone else who sees
this) who mentioned someone should get ActivePerl for testing a
script...     I was under the (FAULTY) impression at the time that
the program cost a lot of money!  It does not... it is free to use.

Now I need to find out if there's any point  in switching!  :-)

The Starman wrote in message ...

>>should be able to run most things on your Win98 with ActivePerl
>>(www.activestate.com) and Apache (www.apache.org).
>>--
>>Regards,
>>Tim Greer
>
>Tim,
>     As far as testing _simple_ perl .pl scripts (those that would only
>interact with PERL.EXE and your STDIN STDOUT operating system
>devices, etc.),  I see no reason to plunk down mucho bucks when one





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

Date: Sat, 26 Jun 1999 01:48:45 GMT
From: tfischer@deakin.edu.au (Thomas Fischer)
Subject: Re: Unix CGI > Win/Mac
Message-Id: <37742ec9.324882165@news.deakin.edu.au>

On Fri, 25 Jun 1999 13:46:06 -0700, Tom Phoenix <rootbeer@redcat.com>
wrote:

>The answer is the same even if your program isn't a Perl program, so you
>should probably be asking this in a newsgroup about CGI programming or
>something similar. But I'll tell you that HTML (including forms and their
>data) doesn't care which platform it's on. Just use \n wherever you want a
>newline, and everything should work. If (much to my surprise) you find
>that it doesn't work, you should check with the docs, FAQs, and newsgroups
>about HTML (or maybe about browsers) for more information. Do you know
>where to find those?

Sure. I think I am quite experienced with perl and on the level you
describe my script works well. The problem is: My script generates
source code and one of the way users can obtain that code is
as a direct HTML feedback with the code as content of a textarea.
I use javascript to automatically select the textarea content and
request the users to copy that onto their clipboard for further usage.

When the code is being copied to an editor like Win32 Notepad
the linefeeds (\n) are not recognized and are displayed as those
blackbox characters (you know what I mean). Neither with a regular
expression on the server side (perl) nor with one in JavaScript I
am able to correct this! As I wrote: My perl script knows wheather
the user platform is UN*X, WIN or MAC therefore it should be
easy... :-(

Try it out: Perl-generate an HTML doc with a textarea containing
text with \n characters and try to copy/paste it on a Windows box.
This is very painful.

Any idea?

Thomas


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

Date: Fri, 25 Jun 1999 22:17:29 -0400
From: Lane Rettig <lane@rettig.com>
Subject: Re: URL
Message-Id: <37743839.BAC2664E@rettig.com>

Sure.  Use <form action=post> rather than GET.

Raj wrote:
> 
> The login page is a plain HTML page and the subsequent pages are
> CGI/Perl Scripts.
> Is there any better way to send the login+password info other than
> appending them to the URL while passing to the CGI/Perl script? and same
> info across Perl scripts.
> how do we do that? TIA,
> ~Raj

-- 
Lane "Sandman" Rettig <lane@rettig.com>

"To punish me for my contempt for authority,
 Fate made me an authority myself." - Albert Einstein


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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