[8971] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2589 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 13 22:10:31 1998

Date: Wed, 13 May 98 19:00:43 -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           Wed, 13 May 1998     Volume: 8 Number: 2589

Today's topics:
    Re: "if" statement help (Martien Verbruggen)
    Re: "if" statement help (brian d foy)
    Re: a header for `Mail me copies' or `Do not mail me co <zenin@bawdycaste.org>
    Re: Code fragment not working (Help!?!) (Martien Verbruggen)
    Re: Does Perl have a IDE?I don't like command line. (Brad Murray)
    Re: Does Perl have a IDE?I don't like command line. (Abigail)
        Finding answers (Website Construction Company)
    Re: Finding Open Client libs mpeppler@mbay.net
    Re: Help with multiple choice Q&A script <harle@nadn.navy.mil>
    Re: how to create name for temporary file <zenin@bawdycaste.org>
        How to open Sybase SQLanywhere with Perl? <phengl@ir-optima.com>
        How to run Perlscript thru IIS? <phengl@ir-optima.com>
    Re: Learning Perl vs Programming Perl (Books) (David Adler)
    Re: Learning Perl vs Programming Perl (Books) <merlyn@stonehenge.com>
    Re: New IDE for Perl <zenin@bawdycaste.org>
    Re: Nuclear bombing of NEW YORK! Small countries can ta <ljz@asfast.com>
    Re: ODBC.pm: Is there a size limit to SQL statements? <jll@skynet.be>
    Re: OO perl and speed <jll@skynet.be>
    Re: OO perl and speed <zenin@bawdycaste.org>
    Re: password (Martien Verbruggen)
    Re: Perl for Non-programmers (was Re: Does Perl have a  <birgitt@order.booktraders.com>
    Re: PROFESSIONAL PERL TRAINING (David Adler)
        read file backwards (Website Construction Company)
    Re: Reg Expr convert one string to another (Martien Verbruggen)
    Re: removing last line from file (Martien Verbruggen)
    Re: resolving IP addresses on WinNT (Michael Fuhr)
    Re: resolving IP addresses on WinNT (Jeffrey Drumm)
        Seen a module for manipulating ZIP files? <gever@helium.com>
    Re: XML Module (Andrew CASSIN)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 14 May 1998 00:00:52 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: "if" statement help
Message-Id: <6jdc7k$dma$3@comdyn.comdyn.com.au>

In article <355A53C1.6BD4FAA4@colba.net>,
	Ala Qumsieh <qumsieh@colba.net> writes:
> Reginald Johnson wrote:
> 
>> <snip>
> 
>> if ($dbh = Msql->Connect(defiant,"cs495")){
>>     print "<body bgcolor=#3300cc text=white link=yellow vlink=green>";
> 
>   if ($dbh == ...)
> 
> = is an assignment .. == is a comparison.

I think that in this case it is meant to be an assignment.

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, 13 May 1998 20:40:19 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: "if" statement help
Message-Id: <comdog-ya02408000R1305982040190001@news.panix.com>
Keywords: from just another new york perl hacker

In article <355A53C1.6BD4FAA4@colba.net>, Ala Qumsieh <qumsieh@colba.net> posted:

>Reginald Johnson wrote:

>> if ($dbh = Msql->Connect(defiant,"cs495")){
>>     print "<body bgcolor=#3300cc text=white link=yellow vlink=green>";
>
>  if ($dbh == ...)
>
>= is an assignment .. == is a comparison.

that was supposed to be an assignment.  the if() fails if the Connect
method fails.

sri[32] cat test.pl
#!/usr/bin/perl

use Msql;

#this one will fail
if( $dbh = Msql->Connect('foo', 'bar') )
        {
        print "Connected to foo:bar\n"
        }
else
        {
        print "Didn't connect to foo:bar\n"
        }

#this one will succeed
if( $dbh = Msql->Connect() )
        {
        print "Connected to localhost\n"
        }
else
        {
        print "Didn't connect to localhost\n"
        }

__END__
sri[33] perl test.pl
Didn't connect to foo:bar
Connected to localhost

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
skimming posts can get you in trouble


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

Date: 14 May 98 01:13:50 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: a header for `Mail me copies' or `Do not mail me copies' (was Re: Ever Wonder Why Not Everyone Uses Modules?)
Message-Id: <895109141.502552@thrush.omix.com>

Jari Aalto  (Jari Aalto+usenet.nil) > <<jari.aalto@poboxes.com> wrote:
: It's convention started and suggested by Lars. Just like you won't find
: the de facto signature separator "\n-- \n" anywhere from the RFCs.

	http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html

	Albeit not even an official draft at this point, but it's at least
	a little more "official" then a random mail filter man page.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 13 May 1998 23:47:47 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Code fragment not working (Help!?!)
Message-Id: <6jdbf3$dma$1@comdyn.comdyn.com.au>

In article <3559f3d0.181338134@news.ucdavis.edu>,
	phounsh@ucdavis.edu (Paul Hounshell) writes:
> OK, I really do not get this.  My If statement does not seem to be
> working.  Line numbers are for reference and the Font used was MS Sans
> Serif (8Pt) in case it doesn't display right.

You write code with that font? 

> 1	open(CREDIT_LIST_IN, "Credits.dat");

Always check the return value of an open(). How do you know you succeeded?

>                  if ($NextChar == "G")
>                 elsif ($NextChar == "X")

To compare strings in perl, you use eq, not ==.

# perldoc perlop

[snip of very unperlish code]

If you program in perl, you should really make use of it's strengths:

#!/usr/local/bin/perl -w
use strict;

while(<DATA>)
{
	chomp;

	# The next regex assumes that all the lines have the format
	#
	# 1 or more digits, followed by > followed by 1 or more characters, 
	# followed by <
	#
	my ($r1, $r2) = /^(\d+)>(.+)<$/;

	die "Bad line: $." unless (defined($r2));

	# special cases
	$r2 = -1 if ($r2 eq 'G');
	$r2 = -2 if ($r2 eq 'X');

	print "\$r1: $r1 - \$r2: $r2\n";
}

__DATA__
123>G<
124>15<
125>X<
126>12345<


That's a lot simpler, isn't it?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Little girls, like butterflies, need no
Commercial Dynamics Pty. Ltd.       | excuse - Lazarus Long
NSW, Australia                      | 


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

Date: 13 May 1998 15:12:50 -0700
From: murrayb@vansel.alcatel.com (Brad Murray)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jd5t2$8c@cadre2.vansel.alcatel.com>

It seems Greg Bacon suggested...
>I wonder whether Ken or Larry or Rob or dmr or bwk use IDEs.  I would be
>shocked to learn that they do.

I build lots of valuable emulators and tools for a large distributed
controls system application with multi-platform requirements.  I work
with another team that does massive data transformation work on
multiple platforms.  Perl is the language of choice for these tasks for
reasons that I hope are obvious.  An IDE is useless to me and I would
suspect it would be a detriment because at any given time I'm trying
to solve an interesting problem in a creative and cost-effective way.
I cannot, therefore, be bound to some GUI designer's notion of what
kinds of things I might want to do.

Consequently, my 'IDE' on any given system consists solely of ensuring
that a minimum subset of the text manipulation tools I need to work
exist for my platform.  Fortunately, they always seem to if I dig hard
enough and am prepared to overlook some inconsistencies.  For me, that
means I have versions of emacs, vi, grep, awk, and a bunch of other GNU
or similarly supplied tools for each OS of interest, which ranges from
OS/2 though NT and well into the Unix realm in many flavours.

No IDE would let me be as productive as a good editor, a command line
that lets me pipe, and some good filters to pipe through.  With these
I can create solutions rather than whine about my interface.  I like
never telling a client 'it cannot be done', and I would never say that
just because I couldn't find the button I need to push because the IDE
designer did not envision my current needs.

In short, if you like IDEs, use Visual Basic.  Perl is not for you.
Perl is for finding solutions, constrained only by your capacity to
implement them.



-- 
Brad Murray       "The fall of modern man will be preceded by the
Software Analyst   de-evolution of communications to the days of
Alcatel Canada     oral tradition."  --Tom Christiansen paraphrased


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

Date: 14 May 1998 01:40:29 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jdi2d$h6a$1@client3.news.psi.net>

Russ Allbery (rra@stanford.edu) wrote on MDCCXVI September MCMXCIII in
<URL: news:m34syuq6po.fsf@windlord.Stanford.EDU>:
++ 
++ Pascal teaches basic block structure and decomposition.  LISP teaches you
++ how to think of things in terms of lists rather than in terms of variables
++ and introduces functional thinking.  I'd never write a real application in
++ either language, but I'm *very* glad I learned them both and I think
++ knowing both makes me a considerably better programmer than if I tried to
++ learn how to program with C or Java or Perl.


Hear, hear.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Thu, 14 May 1998 01:36:42 GMT
From: websites@erols.com (Website Construction Company)
Subject: Finding answers
Message-Id: <355a4a28.12759977@news.erols.com>

I want to be independant as far as finding answers to questions. I
remember once seeing someone using grep to search all of the
documentation to find answers. How did they do that? How would one do
it for Win95 version?

Irwin


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

Date: Thu, 14 May 1998 00:23:31 GMT
From: mpeppler@mbay.net
Subject: Re: Finding Open Client libs
Message-Id: <6jddi4$r6f$1@nnrp1.dejanews.com>

In article <6japf3$l0i$1@nnrp1.dejanews.com>,
  tpa@my-dejanews.com wrote:
>
> I was hoping to get a clarification on how a Perl module actually finds the
> library it is calling. Specifically, in a Perl 5 script on SunOS, I'm trying
> to use the Sybase Open Client libs using the below Sybperl module, I state:
>
> use Sybase::DBlib.pm;
>
> I know where this module exists, but I'm unclear on how my program finds the
> Sybase Open Client C libraries. My understanding is that these libs are
> dynamically linked in Perl 5, compared to the old "sybperl" executable that
> identified the Sybase libs at compilation time.

If the code is dynamically linked (you can check with the ldd command, for
example

	ldd sybperl
	ldd perl
or
	ldd $PERL5LIB/site_perl/sun4-solaris/Sybase/DBlib/DBlib.so

You can direct perl to use a certain set of libraries by using LD_LIBRARY_PATH
to point to the appropriate directory.

Michael

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


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

Date: Wed, 13 May 1998 20:54:43 -0400
From: Jim Harle <harle@nadn.navy.mil>
Subject: Re: Help with multiple choice Q&A script
Message-Id: <355A40D2.CDCCDE8B@nadn.navy.mil>

Its not necessary to do hashes or auto increment.  The original code can be used,
the to get the correct index, use
   $index = ord(lc(<STDIN>)) - ord('a');

Hakan Hjelmstrom wrote:

> You need to read the docs on hashes and possibly the autoincrement
> operator.
>
> Follow-ups set.
>
> Hekan Hjelmstrvm
> hawk@algonet.se





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

Date: 14 May 1998 01:22:01 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: how to create name for temporary file
Message-Id: <895109389.211748@thrush.omix.com>

No one mentioned the new_tmpfile() constructor of the IO::File module?
Albeit probably only useful under Unix as I doubt NT/95's file system would
be this cool.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 14 May 1998 00:41:45 GMT
From: "Pheng Lay" <phengl@ir-optima.com>
Subject: How to open Sybase SQLanywhere with Perl?
Message-Id: <01bd7ed0$db5dd920$118fd9cf@pheng-lay>

My database is SQLanywhere 5.0 running on NT Server 4.0.  I would like to
be able to open/update/close the SQL database from a perlscript.  Any help
on how to do this would be really appreciated.  Thank You.

			phengl@ir-optima.com




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

Date: 14 May 1998 00:41:03 GMT
From: "Pheng Lay" <phengl@ir-optima.com>
Subject: How to run Perlscript thru IIS?
Message-Id: <01bd7ed0$c242d8a0$118fd9cf@pheng-lay>

I'm using the IIS that come with NT 4.0 and have installed Perl interpreter
build 316 (PISEi316.exe) from ActiveState.com.  I can run perlscript find
through the command line, but I could not get IIS to run the perlscript and
display its output to the browser.  The whole intent is to have Java Applet
call the Perlscript to open the SQLany50 database.  I would really
appreciated if anyone can help with resolve this issue.  Thank You.

		phengl@ir-optima.com



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

Date: 14 May 1998 00:18:02 GMT
From: dha@panix.com (David Adler)
Subject: Re: Learning Perl vs Programming Perl (Books)
Message-Id: <6jdd7q$keg@news1.panix.com>

On 12 May 1998 01:10:39 GMT, angst <angst@scrye.com> wrote:

>Or, just get both to be charitable to randall.

Uh, that's "Randal" (one 'l', don'cha know).

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"This is Mace's planet.  We Just Live here."


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

Date: Thu, 14 May 1998 00:56:18 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: dha@panix.com (David Adler)
Subject: Re: Learning Perl vs Programming Perl (Books)
Message-Id: <8cpvhhoeks.fsf@gadget.cscaper.com>

>>>>> "David" == David Adler <dha@panix.com> writes:

David> On 12 May 1998 01:10:39 GMT, angst <angst@scrye.com> wrote:
>> Or, just get both to be charitable to randall.

David> Uh, that's "Randal" (one 'l', don'cha know).

If they buy *both* books, they can spell my name whatever way
they *want*!

:-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 110 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 14 May 1998 01:28:32 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: New IDE for Perl
Message-Id: <895109780.560164@thrush.omix.com>

Stuart McDow <smcdow@arlut.utexas.edu> wrote:
: The *first* IDE? What, then, is emacs?

	Emacs is a religion, not an IDE. :-)

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 13 May 1998 20:34:32 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Nuclear bombing of NEW YORK! Small countries can target with nukes!
Message-Id: <lt1ztx1yhz.fsf@asfast.com>

jdporter@min.net (John Porter) writes:

> On Tue, 12 May 1998 17:28:57 -0500,
> in article <3558CD29.12CB@yahoo.com>,
> gdw@yahoo.com (gdw) wrote:
> > 
> > [ ... ]
> > 
> > You are living, sleeping and walking on a planet which is a 
> > LIVE ATOM BOMB and a HUGE BAR MAGNET!!

Uh oh!  This looks like Return of the Son of the Monster Magnet.  I was
wondering if that was ever really going to happen.

> The LIVE ATOM BOMB part is spooky, but the HUGE BAR MAGNET part totally
> scares the sh*t out of me.  What can we do, who can we call?

Gauss Busters?

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Thu, 14 May 1998 02:59:03 +0200
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: ODBC.pm: Is there a size limit to SQL statements?
Message-Id: <VA.00000054.00253b02@enterprise>

> It would appear that ODBC.pm has a limit on the size of SQL statements
> (around 60K) that it can handle.

Pardon my curiosity, but why are them statements *that* big?

Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy/



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

Date: Thu, 14 May 1998 02:59:05 +0200
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: OO perl and speed
Message-Id: <VA.00000056.00254086@enterprise>

That's a recurring debate on the cost of OO in *any* language.

Accessors are expensive in Perl, because they don't do a lot, and method lookup 
overhead dominates total method execution time.

The same reproach can be done to C++ virtual functions calls that land in very 
short methods. But if the method does any significant piece of work, I bet you 
won't even feel the difference.

Besides, doing things without OO may bring in costs of its own...

Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy/



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

Date: 14 May 1998 01:42:01 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: OO perl and speed
Message-Id: <895110589.306103@thrush.omix.com>

rdosser@my-dejanews.com wrote:
: In man perltoot, Tom refers a couple of times to the speed of OO perl - that
: direct hash lookups are an order of magnitude faster than method lookup, and
: "if you wanted fast, you wouldn't be using objects at all." Can anybody point
: me to a resource expanding on that? I want to know more about the tradeoffs.

	Methods (in any language) are inherently slower then function/subroutine
	calls because they must do at least two levels of lookup to find the
	method code pointer (They must lookup there first level package/class,
	then go looking for the method pointer).  The greater the level of
	inheritance (ala "reuse") the greater the effect can be, depending
	(some compilers can cut this down, depending on the language).

	OOOP (Overly Object Oriented Programming (term from Tom?)) can cause it
	to get even worse.  If you have to do set/get method calls for every
	field in your object it can lead to a major amount of overhead, even
	if the extra overhead of a method call vs a function call wasn't
	part of it. -You've got to push your entire current process state
	onto the stack plus any method arguments before calling the
	method, then pull it all back when you return.  This can be a
	massive movement of data around to/from memory when you just want to
	set the value of one location of memory.

	They are all tool.  There are times to use objects, times not to. 
	Times to make object data accessible only via methods, and times not
	too.  Take each case on it's own needs.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 14 May 1998 00:05:14 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: password
Message-Id: <6jdcfq$dma$4@comdyn.comdyn.com.au>

In article <3559C329.75022EB0@kodak.com>,
	Brian Mathis <brianm@kodak.com> writes:
> Martien Verbruggen wrote:
>> In article <6j8eib$7ot$1@netnews.upenn.edu>,
>>         miuwong@blue.seas.upenn.edu (Miu Alex Wong) writes:
>> > hi,
>> > I need to have users type in their telnet account login name and passwd
>> > on the web and check them against the master password file see whether they
>> > have typed in the correct one, is there any way to do that.
>> 
>> Hmm. You do realise that unless you use the right dort of connection,
>> which uses some sort of encryption, that this is unsafe, right? But
>> that is a discussion for one of the comp.infosystems.www.* groups, and
>> maybe some of the security groups.

> I'm just getting fed up with the amount of misleading information that
> is constantly being brought up, especially to newbies, with the sole
> intent of trying to make them paranoid.

How do you know what my intent is? My intent was to make him aware of
the fact that it is not secure. What he does with that is his
business, not mine. It's his responsibility to make decisions based on
the information he can find about it. If he implements this, without
any precautions or thought, he might find himself involved in a law
suit down the track when in some way one of those passwords gets
intercepted.

There are security issues involved. It has nothing to do with
paranoia. It has to do with being _aware_ of the issues, and being
_informed_.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd.       | enough features yet.
NSW, Australia                      | 


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

Date: Wed, 13 May 1998 21:27:59 -0400
From: Birgitt Funk <birgitt@order.booktraders.com>
Subject: Re: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355A489F.ADAEC1C8@order.booktraders.com>

Tom Christiansen wrote:


> 
> Yes, although it's its dwimmer dweomer that's important
> here.  Other languages also qualify.  Kill memory management,
> anal retention, and strong typing.
> 
> :If your answer would be yes, do you think it's already taught
> :somewhere the 'right' way ?
> 
> I don't know that.  I don't try to teach it as a first language,
> although I know people for whom it was indeed such.
> 

Thank you, and thanks to all who have given me advice in this
thread. My original question doesn't seem so relevant to me or
my situation anymore.

I am sure (and very curious) that I will seek to learn both 
languages and make up my own mind why one might be so "stinky, 
but teaches the right mindset" and the other has so much "beauty 
that seasoned oldtimers fall passionately in love with
it". Thanks again, I really appreciated your answer and
pointers.

Birgitt Funk


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

Date: 14 May 1998 00:27:51 GMT
From: dha@panix.com (David Adler)
Subject: Re: PROFESSIONAL PERL TRAINING
Message-Id: <6jddq7$keg@news1.panix.com>

On Tue, 12 May 1998 20:44:52 GMT, Mr. D <rwilliams@altavista.net> wrote:
>I am searching for a professional institution in the Indiana or Ohio states
>that offers beginning to advanced Perl Training.  I have been looking around
>the web for about 2 weeks and haven't found anything even close.  Does
>anyone out there know of such an organization that offers this type of
>training.

Check out <http://www.perltraining.com> (surprise! :-).  They're not
in your geographical location, but they do travel.

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"You can lead a bigot to water, but if you don't tie him up, you can't
make him drown." - The Psychodots


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

Date: Thu, 14 May 1998 01:37:44 GMT
From: websites@erols.com (Website Construction Company)
Subject: read file backwards
Message-Id: <355a4ab2.12897764@news.erols.com>

I looked in many places, and I know I have seen the answer before but
can't find it, so....

How do you read from the bottom line up in a text file?

Thanks


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

Date: 13 May 1998 23:52:51 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Reg Expr convert one string to another
Message-Id: <6jdboj$dma$2@comdyn.comdyn.com.au>

In article <chilton-1305981501190001@121-cdm-165.tca.net>,
	chilton@trag.com (Chilton) writes:
> This is an easy one.
> 
> I want to convert the following string:
> $string1 = "051098.txt";
> 
> into:
> 5/10/98
> 
> and ultimately into:
> 5/10

$t = "051098.txt";
$t =~ s|^(\d\d)(\d\d)(\d\d).*$|$1/$2/$3|;
$t2 = "$1/$2";

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The gene pool could use a little
Commercial Dynamics Pty. Ltd.       | chlorine.
NSW, Australia                      | 


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

Date: 14 May 1998 01:31:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: removing last line from file
Message-Id: <6jdhi0$ea0$1@comdyn.comdyn.com.au>

In article <01bd7d9f$f7943800$0400a8c0@bruce>,
	"Baton" <baton@vision.net.au> writes:
> how would i go about removing the last line of a text file?
> also i need a way of displaying that line before it gets deleted

# perldoc perlfaq5
     How do I change one line in a file/delete a line in a
     file/insert a line in the middle of a file/append to the
     beginning of a file?

> please email me on baton@xenon.net
> if you can help me

Nope. Post here, read here.

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, 14 May 1998 00:33:50 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: resolving IP addresses on WinNT
Message-Id: <6jde5c$p06@flatland.dimensional.com>

Tom Phoenix <rootbeer@teleport.com> writes:

> On Wed, 13 May 1998, michal wrote:
>
> > here's a fun little routine to resolve ip addresses on an
> > NT system...
> > 
> > now that I've gone and done it, can someone tell me where
> > I should have looked to begin with? :)
>
> Maybe Net::DNS?

The current released version of Net::DNS doesn't appear to work on NT
due to limitations in Win32's socket implementation.  I was working
on some workarounds recently but unfortunately I don't have any NT
machines of my own to play with, so I have to scrounge time on one
or rely on others to report back to me how the latest changes worked
(volunteers welcome, especially anybody with experience working around
socket limitations on NT).

Mi tamen dankas pro la mencio :-)

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/


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

Date: Thu, 14 May 1998 00:51:57 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: resolving IP addresses on WinNT
Message-Id: <355a3849.4075044@news.mmc.org>

On Wed, 13 May 1998 15:35:29 -0400, michal <mwallace@abelsolutions.com>
wrote:

>hey all, 
>
>here's a fun little routine to resolve ip addresses on an
>NT system...
>
>now that I've gone and done it, can someone tell me where
>I should have looked to begin with? :)
>
>- michal
>
(fun little code fragment snipped)

If your needs are as simple as what the code fragment demonstrated,
gethostbyaddr() works on NT (at least in the GS port).

-- 
                           Jeffrey R. Drumm, Systems Integration Specialist
                                  Maine Medical Center Information Services
                                     420 Cumberland Ave, Portland, ME 04101
                                                        drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me


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

Date: Thu, 14 May 1998 00:06:48 GMT
From: Gever Tulley <gever@helium.com>
Subject: Seen a module for manipulating ZIP files?
Message-Id: <355A3620.A919AB12@helium.com>

I would like to create, list, and extract items from
a ZIP file using Perl. Has anybody already written this?

Thanks,
	-gever


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

Date: 14 May 1998 00:52:33 GMT
From: acassin@cs.mu.oz.au (Andrew CASSIN)
Subject: Re: XML Module
Message-Id: <6jdf8h$17c$1@mulga.cs.mu.OZ.AU>

Ion Chalmers Freeman (ion@aroma.com) wrote:
:     I've got a DTD and I need to output valid XML from my perl script. Is
: there a module that assists with this? I couldn't find one on CPAN.

Your own .sig nearly gives you the answer. Try

http://www.sil.org/sgml/xml.html

which offers a detailed list of many aspects of XML technology.

Andrew Cassin
acassin@cs.mu.oz.au


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 2589
**************************************

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