[11689] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5289 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 3 01:05:04 1999

Date: Fri, 2 Apr 99 22:00:19 -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           Fri, 2 Apr 1999     Volume: 8 Number: 5289

Today's topics:
    Re: Alternative for Perl agniora@usa.net
    Re: Alternative for Perl (Abigail)
    Re: Alternative for Perl agniora@usa.net
    Re: Can you return hashes in subroutines? <jdf@pobox.com>
    Re: determining the browser? (Abigail)
        Different `dir`-results <th.bossert@z.nospam.zgs.de>
    Re: Different `dir`-results (Bob Trieger)
        file handle to subroutine (Jim and Paula)
    Re: file handle to subroutine <rick.delaney@home.com>
    Re: Help! Perl5 Regex \b problem!? <jdf@pobox.com>
        Help! jros2956@my-dejanews.com
        Help: require() doesn't work under WIN95 <erlermf@skypoint.com>
    Re: Help: require() doesn't work under WIN95 <perlguy@technologist.com>
    Re: Help: require() doesn't work under WIN95 <ffchopin@worldnet.att.net>
    Re: Help: require() doesn't work under WIN95 (Bob Trieger)
    Re: here docs vs qq quote operator. Just personal prefe (Abigail)
    Re: How to set the Printer fonts using perl? <ffchopin@worldnet.att.net>
    Re: How to set the Printer fonts using perl? (Abigail)
        I need help  <tazmen@primary.net>
    Re: I need help <ffchopin@worldnet.att.net>
    Re: Is there any date/time types/manipulating functions (Abigail)
        Modifying a File <account@asiamake.com>
    Re: Modifying a File <ffchopin@worldnet.att.net>
    Re: Reading local files <ffchopin@worldnet.att.net>
        Silicon Valley Perl Mongers? hwy280@yahoo.com
    Re: Simple perl question <jdf@pobox.com>
    Re: Testing Perl Scripts???? (Bob Trieger)
    Re: Win32/Perl/Apache Problem <ffchopin@worldnet.att.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 03 Apr 1999 03:53:16 GMT
From: agniora@usa.net
Subject: Re: Alternative for Perl
Message-Id: <7e43ba$n17$1@nnrp1.dejanews.com>


> perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
>              "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
>              "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
>
Hey Abigail, i ddnt quite understand the above line completely, $@ is the eval
error msg... though i know this definitely means something, i cant make any
heads or tails out of this one... can u please help. thanks.
--Nayeem

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


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

Date: 3 Apr 1999 04:25:04 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Alternative for Perl
Message-Id: <7e4570$s4b$4@client2.news.psi.net>

agniora@usa.net (agniora@usa.net) wrote on MMXLI September MCMXCIII in
<URL:news:7e43ba$n17$1@nnrp1.dejanews.com>:
'' 
'' > perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164"
'' >              "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162"
'' >              "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
'' >
'' Hey Abigail, i ddnt quite understand the above line completely, $@ is the eva
'' error msg...

No it's not. $@ is a normal variable. eval just happens to write error
messages in this variable. But otherwise, it acts like any other variable.

''              though i know this definitely means something, i cant make any
'' heads or tails out of this one... can u please help. thanks.


Maybe you should do some debugging. You know, with print statements and such.



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


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

Date: Sat, 03 Apr 1999 04:21:52 GMT
From: agniora@usa.net
Subject: Re: Alternative for Perl
Message-Id: <7e450p$odb$1@nnrp1.dejanews.com>


> perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
>           for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
>           print chr 0x$& and q
>           qq}*excess********}'
>
Sorry abigail, but i cant seem to work this out either... i tried real hard.
can u help me on this too.
Agniora (Nayeem)

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


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

Date: 03 Apr 1999 00:06:53 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: Can you return hashes in subroutines?
Message-Id: <m3677expg2.fsf@joshua.panix.com>

"David L. Cassell" <cassell@mail.cor.epa.gov> writes:

> and then look at the MLDBM module, which will help you do multi-dim
> structures.

It doesn't really help you "do" perl data structures, it merely
provides transparent *persistence* for perl data structures.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 3 Apr 1999 04:28:40 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: determining the browser?
Message-Id: <7e45do$s4b$5@client2.news.psi.net>

Jason Simms (ffchopin@worldnet.att.net) wrote on MMXLI September MCMXCIII
in <URL:news:7e3suj$e6e$1@bgtnsc02.worldnet.att.net>:
'' 
'' Well, using CGI.pm, you can certainly do it.  Here is a REALLY short
'' example:
'' 
'' #!usr/bin/perl -w
'' 
'' use CGI qw/:standard/;
'' 
'' print header, start_html('Browser Detection Example');
'' 
'' print "You are using IE" if user_agent()=~ /MSIE/;
'' 
'' print "You are using Netscape" if user_agent()=~ /Mozilla/;
'' 
'' print end_html;
'' 
'' # END SCRIPT
'' 


$ telnet www.att.net 80
HEAD / HTTP/1.0
User-Agent: Eyeball Mark IV (not Mozilla or MSIE)

$


Followups set.


Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


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

Date: 3 Apr 1999 05:04:53 GMT
From: "T. Bossert" <th.bossert@z.nospam.zgs.de>
Subject: Different `dir`-results
Message-Id: <3705A222.418A27D5@z.nospam.zgs.de>

Hi,

Why is it, that on WinNT a @result=`dir` in perl 5.004 produces
different output from the one given by perl 5.005 ( all versions so far
)?

Thomas



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

Date: Sat, 03 Apr 1999 05:30:32 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Different `dir`-results
Message-Id: <7e48ul$nh2$2@fir.prod.itd.earthlink.net>

th.bossert@z.nospam.zgs.de wrote:
o>Why is it, that on WinNT a @result=`dir` in perl 5.004 produces
o>different output from the one given by perl 5.005 ( all versions so far
o>)?

I can't answer the question but I suggest you use opendir, readdir and 
closedir. That way you will always get the desired results. Solved a lot of my 
headaches.


Good luck,

Bob Trieger
sowmaster@juicepigs.com       



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

Date: Sat, 03 Apr 1999 04:51:27 GMT
From: gemhound@gemhound.com (Jim and Paula)
Subject: file handle to subroutine
Message-Id: <37059e41.332373@news.primeline.com>

I've been trying to pass a file handle to a subroutine, as a my
variable -- but for some reason I can never find this in a book.
Mainly I want to write some standard file handling subroutines.  Can
someone give me a small working example, which I am sure is the one
thing I haven't tried.


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

Date: Sat, 03 Apr 1999 05:27:14 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: file handle to subroutine
Message-Id: <3705A8BA.63364B6A@home.com>

[posted & mailed]

Jim and Paula wrote:
> 
> I've been trying to pass a file handle to a subroutine, as a my
> variable -- but for some reason I can never find this in a book.
> Mainly I want to write some standard file handling subroutines.  Can
> someone give me a small working example, which I am sure is the one
> thing I haven't tried.

I think there might be something else you haven't tried; the FAQ.

perldoc perlfaq5

    How can I make a filehandle local to a subroutine? How do I pass 
    filehandles between subroutines? How do I make an array of 
    filehandles? 

-- 
Rick Delaney
rick.delaney@home.com


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

Date: 03 Apr 1999 00:25:26 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: stuart@mohawk.net
Subject: Re: Help! Perl5 Regex \b problem!?
Message-Id: <m33e2ixol5.fsf@joshua.panix.com>

stuart@mohawk.net writes:

> $my_str =~ s/(\b(?!and\b|n?or\b)\S+(?:\s|$))/$spec_word=$1/gi;

Here's one solution.

   s/(\S+)\s*(and|or|$)/$spec_word=$1 $2/g;

But that provides no error checking.  You really want to parse the
input, and not assume that it's well formed.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Sat, 03 Apr 1999 03:59:51 GMT
From: jros2956@my-dejanews.com
Subject: Help!
Message-Id: <7e43nk$nce$1@nnrp1.dejanews.com>

I have a bit of a conundrum.  Here's my problem.  I am interfacing a Sybase
database with Perl.  I have paper titles (for example "test") that I have the
user pick out of a select box.  My problem is the data I was given has titles
that are identical except for a space, for example " Internet Protocol"
and "Internet Protocol"  When I pull the titles out of my form using the $in
operator, it apparently chops out the space. I need that space however
otherwise I can't tell which paper it is.  Any suggestions?

Jeremy Rosenberg

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


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

Date: Fri, 02 Apr 1999 22:10:35 -0600
From: matthew <erlermf@skypoint.com>
Subject: Help: require() doesn't work under WIN95
Message-Id: <370594B9.6A3971EB@skypoint.com>

I'm trying to write a utility file that I will include in other files.
I tried using require 'util.pl', but I continually get the error
"util.pl did not return a true value".  If anyone knows why, I would be
grateful for their help.
                        Thanks in advance.

Matthew Erler
erlermf@skypoint.com



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

Date: Fri, 02 Apr 1999 22:08:43 -0600
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: Help: require() doesn't work under WIN95
Message-Id: <3705944B.2B61C801@technologist.com>

matthew wrote:
> 
> I'm trying to write a utility file that I will include in other files.
> I tried using require 'util.pl', but I continually get the error
> "util.pl did not return a true value".  If anyone knows why, I would be
> grateful for their help.
>                         Thanks in advance.
> 
> Matthew Erler
> erlermf@skypoint.com

Matthew,

Place this on the very last line of your include file:

1;

That is the NUMBER 1, followed by a semi-colon.

Perl needs it to return a true value, this does just that!

Good luck!
Brent


-- 
Java?  I've heard of it, it is what I drink while hacking Perl! -me
+----------------------------------------+
|            Brent Michalski             |
|         -- Perl Evangelist --          |
|    E-Mail: perlguy@technologist.com    |
| Resume: http://www.inlink.com/~perlguy |
+----------------------------------------+


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

Date: Fri, 2 Apr 1999 23:16:52 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Help: require() doesn't work under WIN95
Message-Id: <7e454d$g0p$1@bgtnsc02.worldnet.att.net>

> I'm trying to write a utility file that I will include in other files.
> I tried using require 'util.pl', but I continually get the error
> "util.pl did not return a true value".  If anyone knows why, I would be
> grateful for their help.

Some guy was aking this earleir in the week.  You can say:

return 1;

or even:

1; (I think)

at the very end of the include file and it should work fine.

Jason Simms




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

Date: Sat, 03 Apr 1999 04:22:09 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Help: require() doesn't work under WIN95
Message-Id: <7e44ue$ic2$1@fir.prod.itd.earthlink.net>

matthew <erlermf@skypoint.com> wrote:
&>I'm trying to write a utility file that I will include in other files.
&>I tried using require 'util.pl', but I continually get the error
&>"util.pl did not return a true value".  If anyone knows why, I would be
&>grateful for their help.

perldoc -f require


The code you are calling must return a TRUE value. You can do this by placing 
"1;" on the last line of the included code.


HTH

Bob Trieger
sowmaster@juicepigs.com       



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

Date: 3 Apr 1999 04:37:18 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: here docs vs qq quote operator. Just personal preference?
Message-Id: <7e45tu$s4b$6@client2.news.psi.net>

Bob Trieger (sowmaster@juicepigs.com) wrote on MMXLI September MCMXCIII
in <URL:news:7e41b8$dp1$1@fir.prod.itd.earthlink.net>:
-- Many folks in c.l.p.* suggest/advise using "here docs" instead of multiple 
-- print statements. I stopped using here docs when I found the qq & q quote 
-- operators and it has made life for this fat fingered hacker a lot easier.
--
-- With here docs there is always the chance of the extraneous space at the end 
-- making your script fail. The more here docs in the script, the higher your 
-- risk of failure and if you use the same delimiting sequence the much bigger 
-- headache finding this error.
--
-- Using here docs is suggested a lot more than simple quote operators and I was
-- wondering if there is an advantage or just out of habit?


The big advantage here docs have over quoted strings is that you can 
actually finish your statement before starting the large string.

That makes debugging, and understanding the code, a lot easier.


Compare:

$var = $obj1 -> method1 (<<EOT1, 17) + $obj2 -> method2 (<<EOT2, 1);
Some large text.
With many lines.
And even more lines.
EOT1
And even more large text.
And lines.
Endless lines.
It never stops.
Indeed.
More.
More text.
Much more text!
EOT2


And:

$var = $obj1 -> method1 (q /Some large text.
With many lines.
And even more lines.
/, 17) + $obj2 -> method2 (q /And even more large text.
And lines.
Endless lines.
It never stops.
Indeed.
More.
More text.
Much more text!
/, 1);



I find the first one easier.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\\\- -eJust -eanother -ePerl -eHacker -e\\\\-]}-


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

Date: Fri, 2 Apr 1999 23:10:03 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: How to set the Printer fonts using perl?
Message-Id: <7e44nj$ed8$1@bgtnsc02.worldnet.att.net>

> Hi fellas, Is there any ways to change the default text font when writing
> plain text files in perl? cuz usually the font that it prints gets really
big
> and then i cant use perl to create nice-looking reports or invoices.
thanks
> in advance. Nayeem Programmer, Agni Systems Ltd.

Unless I'm really missing something, plain text files means just that -
plain, ascii text.  Without more information on exactly what you're trying
to do (i.e., you mention printing in your header but use an ambiguous
reference to printing in the body), I can't be of much help.  Do you want to
actually print the document to a printer, or just are wondering if you can
change the font that the text file gets output in?  If it is the later, then
no, I don't think so, as Perl will write it in plain ASCII text.  And what
do you mean by "the font gets really big..."?  As in, going from 9 pt. to 12
pt. to 14 pt., etc.?  Please be more specific, and please stop using CUZ...

Jason Simms





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

Date: 3 Apr 1999 04:40:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to set the Printer fonts using perl?
Message-Id: <7e463o$s4b$7@client2.news.psi.net>

agniora@usa.net (agniora@usa.net) wrote on MMXLI September MCMXCIII in
<URL:news:7e4216$m28$1@nnrp1.dejanews.com>:
&& Hi fellas, Is there any ways to change the default text font when writing
&& plain text files in perl? cuz usually the font that it prints gets really big
&& and then i cant use perl to create nice-looking reports or invoices. thanks
&& in advance.


Perl doesn't know anything about fonts. Fonts is something for a display
engine, like a terminal or a printer. There are a gazillion different
ways to indicate what font you want to use; every program that uses the
concept of "font" has its own way. But Perl doesn't display. Perl outputs.

Learn the language your display engine is using, and have Perl talk that
language.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: Fri, 02 Apr 1999 22:17:06 -0600
From: William Tammen <tazmen@primary.net>
Subject: I need help 
Message-Id: <37059642.2143B642@primary.net>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I need a way to design a link that will query say like
<br>.../cgi-bin/forum/forum.pl?preview and post the form at the same time.&nbsp;
I
<br>know all about links only being able to use get method and I know about
<br>sending values with a query but that just does not cut it with text
<br>areas in the form do to the get methods length limits.&nbsp; Now the
normal
<br>post method of a form submit will do the action of
<br>.../cgi-bin/forum/forum.pl?preview and then submit to that url the
form
<br>data directly to stdin of the cgi.&nbsp; I also know of the javascript
function of
<br>submit but that is just a remote control feature, the forms action
would
<br>still have control and would replace my site page with the cgi response
<br>so that will not work. Now there has to be a way of doing
<br>this using javascript or java to mimic this exact process via a true
<br>link so that I can use the link as a perameter in a javascript function
<br>which will load the resulting page sent back by the cgi into a div
tag
<br>layer on my site.&nbsp; This function buffers the page then transfers
it to
<br>said div layer to perform cross browser.&nbsp; The function buffers
using
<br>iframe for IE and a layer in Netscape.&nbsp; This works fine on any
queried
<br>responses from the cgi.&nbsp; I just can't sent text area data in a
standard
<br>query value link. This problem must be solved since dhtml can not be
<br>integrated with cgi due to the natural static nature of cgi responses
<br>wiping out the page they where called from.&nbsp; Now Dan Stienman
has began
<br>attempts at working out this problem but he has only implemented a
cgi
<br>communication example which handles a radio button form.&nbsp; The
ultimate
<br>goal is to do this with all form values especially text fields and
text
<br>areas and combinations of them all in the form.&nbsp;&nbsp; If anyone
is
<br>interested Dan is the true dhtml guru of the net, perhaps the best
kept
<br>secret of the net.
<p>The url to his main page is
<br><A HREF="http://www.dansteinman.com/dynduo/">http://www.dansteinman.com/dynduo/</A>
<p>and the url to the cgi communication&nbsp; is
<br><A HREF="http://www.dansteinman.com/dynduo/cgicomm/cgicomm.html">http://www.dansteinman.com/dynduo/cgicomm/cgicomm.html</A>
<p>Now those who love a cgi challenge take his radio form example and
<br>corresponding perl script and add text fields, text areas, drop down
<br>select menu, and check boxes, and get it to display the data posted
back
<p>to the pages div layer.&nbsp; Will take adapting the javascript function
<br>submitform so javascript and perl talent needed.&nbsp; Dan is busy
working on
<p>IE5 compatibility and I am not having any luck.&nbsp; Thanks in advance&nbsp;
Bill
<br>&nbsp;
<br>&nbsp;</html>



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

Date: Fri, 2 Apr 1999 23:40:41 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: I need help
Message-Id: <7e46hl$lgm$1@bgtnsc02.worldnet.att.net>

This is a multi-part message in MIME format.

------=_NextPart_000_0108_01BE7D62.386EB900
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

  >Now those who love a cgi challenge take his radio form example and=20
  >corresponding perl script and add text fields, text areas, drop down=20
  >select menu, and check boxes, and get it to display the data posted =
back=20

  >to the pages div layer.  Will take adapting the javascript function=20
  >submitform so javascript and perl talent needed.  Dan is busy working =
on=20

  >IE5 compatibility and I am not having any luck.  Thanks in advance  =
Bill  =20

  Am I to believe this guy?  I responded to you via e-mail earlier, then =
you use my suggestion as part of THIS letter?  Gee, thanks...  And then, =
you want free work done on your scripts?  We seem to be getting a lot of =
those requests lately...  What you want done is fairly simple - just =
read the Official Guide to Programming with CGI.pm by Dr. Lincoln Stein. =
 This will tell you all you need to know.  In the meantime, take your =
questions to comp.infosystems.www.authoring.cgi, where your questions =
will be more on-topic.  I suggest you do it yourself, though, so you can =
handle these simple tasks like a self-submitting form yourself.



  Jason Simms


------=_NextPart_000_0108_01BE7D62.386EB900
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <P>&gt;Now those who love a cgi challenge take his radio form example =
and=20
  <BR>&gt;corresponding perl script and add text fields, text areas, =
drop down=20
  <BR>&gt;select menu, and check boxes, and get it to display the data =
posted=20
  back=20
  <P>&gt;to the pages div layer.&nbsp; Will take adapting the javascript =

  function <BR>&gt;submitform so javascript and perl talent =
needed.&nbsp; Dan is=20
  busy working on=20
  <P>&gt;IE5 compatibility and I am not having any luck.&nbsp; Thanks in =

  advance&nbsp; Bill&nbsp;&nbsp; </P>
  <P>Am I to believe this guy?&nbsp; I responded to you via e-mail =
earlier, then=20
  you use my suggestion as part of THIS letter?&nbsp; Gee, =
thanks...&nbsp; And=20
  then, you want free work done on your scripts?&nbsp; We seem to be =
getting a=20
  lot of those requests lately...&nbsp; What you want done is fairly =
simple -=20
  just read the Official Guide to Programming with CGI.pm by Dr. Lincoln =

  Stein.&nbsp; This will tell you all you need to know.&nbsp; In the =
meantime,=20
  take your questions to comp.infosystems.www.authoring.cgi, where your=20
  questions will be more on-topic.&nbsp; I suggest you do it yourself, =
though,=20
  so you can handle these simple tasks like a self-submitting form =
yourself.</P>
  <P>&nbsp;</P>
  <P>Jason Simms</P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0108_01BE7D62.386EB900--



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

Date: 3 Apr 1999 04:41:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Is there any date/time types/manipulating functions?
Message-Id: <7e4668$s4b$8@client2.news.psi.net>

agniora@usa.net (agniora@usa.net) wrote on MMXLI September MCMXCIII in
<URL:news:7e41nu$ln2$1@nnrp1.dejanews.com>:
__ When dealing with date/times in perl it gets very difficult cuz i have to
__ manually recreate these types and their corresponding functions.

Types? What "type" are you creating?

__ if anyone has any clues please let me know

I have some clues.


(Have you read the FAQ? Have you looked at CPAN?)



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: Sat, 03 Apr 1999 12:24:57 +0800
From: Alex <account@asiamake.com>
Subject: Modifying a File
Message-Id: <37059819.B9075A33@asiamake.com>

Please help,
The script  below(actually, I learn from Robert Perl Tutorial ) has run
and test perfectly in my own computer (win 95).  However, when I upload
the scripts to server, it don't work. But no error appear, just don't
work !
The scripts is:

@ARGV="c:/scripts/out.txt";
$^I=".bk";
while (<>) {
    tr/A-Z/a-z/;
    print;
}

No back-up file(out.txt.bk) is created. Also no chnage of the out.txt
file.
Please help.

Thank you
Alex



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

Date: Fri, 2 Apr 1999 23:46:42 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Modifying a File
Message-Id: <7e46sa$ms6$1@bgtnsc02.worldnet.att.net>

> Please help,
> The script  below(actually, I learn from Robert Perl Tutorial ) has run
> and test perfectly in my own computer (win 95).  However, when I upload
> the scripts to server, it don't work. But no error appear, just don't
> work !
> The scripts is:
>
> @ARGV="c:/scripts/out.txt";
> $^I=".bk";
> while (<>) {
>     tr/A-Z/a-z/;
>     print;
> }
>
> No back-up file(out.txt.bk) is created. Also no chnage of the out.txt
> file.

I is here to help yo' problem...  Don't rightly know if you've read the Perl
FAQ yet, but if ye' haven't, just point yer browser to part 5 - your
question is sittin' pretty near th' top...

Jason Simms





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

Date: Fri, 2 Apr 1999 23:26:22 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Reading local files
Message-Id: <7e45mg$i59$1@bgtnsc02.worldnet.att.net>

> I've tried reading files in the way of "C:/Temp/filename.txt".  I've also
> tried both the read and open methods, as well as an $ftp->put and an
> $FTP->Put, using the Win32::Internet and Net::FTP libraries.  Both I have
> manage to get working on moving files on the remote site... neither I have
> been able to have much success with utilizing local files on a desktop.

Accessing remote scripts on NT is much like using Telnet on UNIX - for the
most part, the programs "think" you are actually at the "local" terminal.
More to the point, they don't care.  When accessing files, I know of no way
for the remote script to think of your local box as its local filesystem
(which is what I think you ideally want).  So when you say "c:/path/file" it
thinks, "Alright, what the hell is this guy talking about?  I don't have
that file on my system...".  If I am wrong, someone please correct me,
though I think this is for the most part accurate.

Jason Simms




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

Date: Sat, 03 Apr 1999 05:31:32 GMT
From: hwy280@yahoo.com
Subject: Silicon Valley Perl Mongers?
Message-Id: <7e493k$rk1$1@nnrp1.dejanews.com>



Please correct if I'm wrong. But I find it really strange that there
is NO Perl user group in Silicon Valley, where the use of Perl is
everywhere and created such enormous wealth, and where I believe
LW lives. Why is that? :-)

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


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

Date: 03 Apr 1999 00:03:04 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Raymond C. Jender" <rcj@lucent.com>
Subject: Re: Simple perl question
Message-Id: <m390caxpmf.fsf@joshua.panix.com>

"Raymond C. Jender" <rcj@lucent.com> writes:

> I can print $tmp[0] just fine but if I do
> $name = $tmp[0] printing $name returns zilch!!

I don't believe you.  Can you post some code that behaves as you
describe?

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Sat, 03 Apr 1999 04:39:09 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Testing Perl Scripts????
Message-Id: <7e45u9$ic2$2@fir.prod.itd.earthlink.net>

Steve Somerville <somers@nucleus.com> wrote:
o>    I have Perl on my personal computer... running Windows 95, and I
o>need a way to test Perl scripts before I FTP them to my ISP.

Sure, just run them from the DOS prompt.

o>    Is there a way to have the output from Perl.exe go to my netscape or
o>IE browser? If not... then, how do you guys handle this situation?

You can use CGI.pm and print it to th screen,
Install a webserver and configure it for cgi or
Upload it to your ISP and then telnet in and tweak it.

o>    This has been holding me up for three days now, and I think I've
o>read every FAQ online.

Apparently reading the wrong FAQs. This is one of the most FAQs on the CGI 
newsgroup.


Good luck,

Bob Trieger
sowmaster@juicepigs.com       



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

Date: Fri, 2 Apr 1999 23:32:27 -0500
From: "Jason Simms" <ffchopin@worldnet.att.net>
Subject: Re: Win32/Perl/Apache Problem
Message-Id: <7e461l$jeo$1@bgtnsc02.worldnet.att.net>

> Here is my .pl file which is in C:\Program Files\Apache
> Group\Apache\cgi-bin.  Also, my ScriptAlias is
> /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin".  This script
works
> fine from the command line, however, does not work from the browser.

If the script works from the command line, but not from the browser, then it
is a server issue.  Your question(s) would best be answered in an apache
support group or general servers group.

Jason Simms




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

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

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