[9402] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2997 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 26 19:07:32 1998

Date: Fri, 26 Jun 98 16:00:41 -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, 26 Jun 1998     Volume: 8 Number: 2997

Today's topics:
    Re: [Q] Hash set in recursion, lost in caller kissel@kissel.spicerack.ibm.com
    Re: autovivification and tie questions (Tye McQueen)
    Re: Camel book examples and -w <tchrist@mox.perl.com>
    Re: Catching divide-by-zero justinb@ignored.cray.com
        creating unique session id w/ perl <poquk@ils.unc.edu>
        Field Sort without modules? <trent@jps.net>
    Re: Field Sort without modules? <zenin@bawdycaste.org>
    Re: Field Sort without modules? (Abigail)
    Re: first language <John.Adams@BentonvilleAR.ncr.com>
    Re: first language <tchrist@mox.perl.com>
    Re: Forum Scripts Anyone? <none@spam.com>
    Re: Forum Scripts Anyone? (Bill )
    Re: Help with sorting (jeremy howard todd)
    Re: How to send page to browser in real time? <Darrell@Nash.org>
    Re: Increasing page block size for Perl DBMs <zenin@bawdycaste.org>
    Re: Linked list and a code challenge (Kevin Reid)
    Re: MacPerl and odd filenames (Paul J. Schinder)
    Re: Replacing "stuff" via Regex... HELP! <*@qz.to>
    Re: Replacing "stuff" via Regex... HELP! (brian d foy)
    Re: Replacing "stuff" via Regex... HELP! (Matt Knecht)
    Re: Replacing "stuff" via Regex... HELP! <dgris@rand.dimensional.com>
    Re: syswrite behavior on Win32 (Tye McQueen)
        unrecognized attribute from DBI object hash ref (RonaldWS)
    Re: WARNING: Newbie Inquiry - PERL Architecture (Tye McQueen)
    Re: What a Crappy World (oh, yes!) (Tye McQueen)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 26 Jun 1998 17:14:49 -0400
From: kissel@kissel.spicerack.ibm.com
Subject: Re: [Q] Hash set in recursion, lost in caller
Message-Id: <Pine.A32.3.91.980626171241.17854A-100000@kissel.spicerack.ibm.com>

Oh, gosh...sorry to have wasted your time...

I found that, unbeknownst to myself, I WAS scoping that hash with a
"my" that was carefully hidden from myself, which explains everything.

This shows, conclusively, that I've been at I.B.M. too long, and am
starting to think less.  Or I need glasses.

My apologies.


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

Date: 26 Jun 1998 17:07:34 -0500
From: tye@fiinix.metronet.com (Tye McQueen)
Subject: Re: autovivification and tie questions
Message-Id: <6n1636$srd@fiinix.metronet.com>

In part, Todd Lehman <lehman@javanet.com> wrote:
) 
) The thing that perl didn't seem to like was my allocating a fresh new object
) and copying values from the one it passed me into the new object.  This
) approach made sense to me, because I don't want to assume that I may modify
) the original value, but it caused 5.004 to die in a really weird way -- the
) next FETCH failed when it shouldn't have.  I never figured out whether this
) was a bug in 5.004 or just something beyond my level of understanding, but it
) really freaked me out for a long time.

Perl5.004_02 certainly had some bugs with tied hashes.  I got the
symptoms you describe in Perl5.004_02 even though I'm not doing what
you describe.  I haven't noticed any bugs with tied hashes in
Perl5.004_04.

So if you were having the problem prior to Perl5.004_04, I suggest
you try again.

Now Perl5.004_04 _does_ seem to have some strange ideas about tied
arrays, but the documentation warns that they "aren't finished" so
I guess I can't complain too much.
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

Date: 26 Jun 1998 22:17:26 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Camel book examples and -w
Message-Id: <6n16lm$9f9$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent via mail]

Try using defined(fileno(FH)) or something.

--tom
-- 
Build a system that even a fool can use, and only a fool will want to use it.


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

Date: 25 Jun 1998 16:24:23 -0700
From: justinb@ignored.cray.com
To: r11630@email.sps.mot.com>
Subject: Re: Catching divide-by-zero
Message-Id: <kgcra0dysig.fsf@dervish.cray.com>


[posted and mailed]

Michael Scott <r11630@email.sps.mot.com> writes:

> This is a multi-part message in MIME format.
> --------------07EB97C61E2C2E042B847630
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

Try not to do this, please. Many people score such a message
completely out of sight ;)

> 
> I am trying to add some code to a Perl script I run via cron to 
> produce a daily report. Every now and then, corrupted data means 
> I get a div0 and subsequent death by momba. Rather than bullet-proof 
> every statement in the script with validity checks, I wanted to create 
> a handler routine to give me some more detailed information. I tried 
> the following, and although the script does not complain when executed, 
> nothing is printed to the screen. I did a search on Deja News for 
> similar, but nothing doing there - if this is an old one, sorry!

You need to re-read the perlfunc manpage. Short answer is that you're 
mis-using the $SIG{whatever} statement, but you should probably take a 
look at eval() as well.

Let me know if this helps,

justinb

-- 
Justin Banks - Silicon Graphics Inc. Eagan, MN
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER." -AC


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

Date: Fri, 26 Jun 1998 17:52:40 -0400
From: Kyle Poquette <poquk@ils.unc.edu>
Subject: creating unique session id w/ perl
Message-Id: <Pine.SOL.3.96.980626174012.2371A-100000@ruby.ils.unc.edu>

Hello.  I have run into a problem for which I am having quite a problem
finding the solution. 

I am trying to create a unique session id to be assigned to each user of
my web site.  Now, I realize that I can create a unique identifier using a
combination of the time function and the process ID.  However, I plan to
later user this session id to reference confidential information about the
user of the session in a database, and I don't want the session id to be
guessed easily.

Is there a way to create a session id (using perl, of course) which cannot
easily be guessed, and which will generate a unique string for each
invocation of the cgi script (which could possibly be running multiple
times per second)?  How do the larger shopping cart sites like amazon.com
create their session ids?

Any and all suggestions will be greatly appreciated.

Many thanks,

-Kyle



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

Date: Fri, 26 Jun 1998 14:43:13 -0700
From: Trent Hare <trent@jps.net>
Subject: Field Sort without modules?
Message-Id: <359415F1.7121@jps.net>

Looking for field sorting without modules installed...

(ie)
an comma separated ascii file , sorted by field[2] (after the split)

Clues anyone?

Thanks,
Trent


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

Date: 26 Jun 1998 22:29:54 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Field Sort without modules?
Message-Id: <898900698.154341@thrush.omix.com>

Trent Hare <trent@jps.net> wrote:
: Looking for field sorting without modules installed...
: an comma separated ascii file , sorted by field[2] (after the split)

	Untested, typos probably to be found, use at your own risk, etc...

	## Read data, doing splits first
	while (<>) {
	    push @lines, [ split /,/ ];
	}
	foreach my $line (sort { $a->[2] cmp $b->[2] } @lines) {
		...stuff with @{ $line }...
	}

	Or, do it at sort time:

	foreach my $line (sort { (split /,/, $a)[2] cmp (split /,/, $b)[2] } <>) { 
		...stuff with $line...
	}

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 26 Jun 1998 22:49:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Field Sort without modules?
Message-Id: <6n18ie$mhj$2@client3.news.psi.net>

Trent Hare (trent@jps.net) wrote on MDCCLX September MCMXCIII in
<URL: news:359415F1.7121@jps.net>:
++ Looking for field sorting without modules installed...
++ 
++ (ie)
++ an comma separated ascii file , sorted by field[2] (after the split)
++ 
++ Clues anyone?


Yes. It's called FAQ



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Fri, 26 Jun 1998 16:23:08 -0500
From: John Adams <John.Adams@BentonvilleAR.ncr.com>
Subject: Re: first language
Message-Id: <3594113C.6A21@BentonvilleAR.ncr.com>

Tom Christiansen wrote:

> I first learned BASIC (BASIC-PLUS under RSTS/E), followed by Fortran,

I first learned Fortran II out of a programmed IBM text I found for $.50
in a used book store, way back in 197...um...let's just say it was the
seventies. Doing all the excercises by hand, without access to a
mainframe, did me a whole lot of good.

> Of course, I have never understood why anyone thinks they need anything
> but K&R to learn C, either.  :-)

Well, that's a bit like saying that no one should need anything but the
Camel book to learn Perl, eh? I have access to the A.W.K. awk book, but
I certainly use Dougherty and Robbins by preference.

And I have to second that emotion from whomever (Abigail?) recommended
Knuth's books. I've only bought volume two (Sorting and Searching), but
I wouldn't be without it.

	John A
	speaking strictly for himself


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

Date: 26 Jun 1998 22:20:23 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: first language
Message-Id: <6n16r7$9f9$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    John.Adams@BentonvilleAR.ncr.com writes:
:And I have to second that emotion from whomever (Abigail?) recommended
:Knuth's books. I've only bought volume two (Sorting and Searching), but
:I wouldn't be without it.

Agreed whole-heartedly.  But it's "whoever". :-)

--tom
-- 
    There is, however, a strange, musty smell in the air that reminds me of
    something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
        --Larry Wall in Configure from the perl distribution


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

Date: Fri, 26 Jun 1998 10:55:18 -1000
From: "Locke" <none@spam.com>
Subject: Re: Forum Scripts Anyone?
Message-Id: <3593e0ff.0@news.hawaii.rr.com>

www.cgi-resources.com is my favorite place to start


F.Quednau wrote in message <3593740D.8E9000D7@nortel.co.uk>...
>johnny99@sydney.dialix.oz.au wrote:
>>
>> Does anyone know where I can get a PERL/CGI script which lets you run a
forum
>> -- that is, a localised HTML "newsgroup" where people can post, and reply
to
>> each other's posts?
>
>This is not really the right place for program requests. You might want to
try
>www.cgiresources.com . Very straightforward title.
>
>> When I say "where can I get it", that means I'm prepared to pay, by the
way...
>
>How much? I might make you one :) Seriously, there's enough stuff around so
that
>you don't have to pay...
>
>--
>____________________________________________________________
>Frank Quednau
>http://www.surrey.ac.uk/~me51fq
>________________________________________________




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

Date: Fri, 26 Jun 1998 21:17:21 GMT
From: Florkleabigun@Lodi.NJ.NET (Bill )
Subject: Re: Forum Scripts Anyone?
Message-Id: <35950f4e.56652334@news.earthlink.net>

There are many many scripts out there that do what you want.

I think one of the nicest right now is Ultimate BBS. It provides a
slick threaded message base organized around foums. Its cgi driven,
and easy to maintain. It is NOT free but if what you want is a forum
that presents well, its a top choice.

Selena Sol has a BBS/message script
Matt's has wwwboard, a longtime standard 
Netboard is also pretty good.

Let me know if you need any more advice.

Bill


johnny99@sydney.dialix.oz.au wrote:

>Does anyone know where I can get a PERL/CGI script which lets you run a forum
>-- that is, a localised HTML "newsgroup" where people can post, and reply to
>each other's posts?
>
>I'm thinking of something like the setup they have at Mister Cranky's movie
>review forums:
>
>     http://www.mrcranky.com
>
>A fabulous site for anyone who likes the movies by the way.
>
>When I say "where can I get it", that means I'm prepared to pay, by the way...
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/   Now offering spam-free web-based newsreading



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

Date: 26 Jun 1998 21:42:31 GMT
From: jhtodd@students.uiuc.edu (jeremy howard todd)
Subject: Re: Help with sorting
Message-Id: <6n14k7$mvt$1@vixen.cso.uiuc.edu>

George Kassyousef <gkassyou@newbridge.com> writes:
>This is a multi-part message in MIME format.

	It shouldn't be, it's just plain text.

>My perl script reads a file and insert some specific info into several
>text variables such as

>var1 var2 var3 var4.

>var1 is a string that holds a persons name.
>var2 is an integer that holds the persons age.
>var3 is a string of the persons address.
>var4 is an integer of the persons number.

>How can I sort on this persons age if I have a list of people.

>eg.
>jack    23    100 huntly cres.    555-1233
>mike    25    200 hunly cres.    555-2332
>.
>.
>.etc.

I would put them in an array instead of keeping 4 separate variables:

	push(@data, [$var1, $var2, $var3, $var4]);

Then you can sort on age ($var2) with:

	(**) @data = sort { $a->[1] <=> $b->[1] } @data;

Of course, reading the values into the array to begin with rather than
using $var1, ..., $var4 will save some time and memory.

(**) If you haven't seen the $a->[1] type of construct before, this is
     one use of references (see the perlref manpage), which are among
     perl's more important features and can be used to do lots of stuff
     like this.  Definitely take a look.

	-jht
--
Jeremy Todd                       Computer Programmer        _,/
jhtodd@uiuc.edu                   ITCS On-line Development <__ \_.---.
http://www.cen.uiuc.edu/~jhtodd/  College of ACES, UIUC       \_  /   \
Zupfe Boy and Night Owl           (And Kangaroo Aficianado)     \)\ /\.\
===========================================================       //   \\
"M-O-O-N, that spells moon" - Tom Cullen                        ,/'     `\_,


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

Date: Fri, 26 Jun 1998 15:31:00 -0600
From: "Darrell Nash" <Darrell@Nash.org>
Subject: Re: How to send page to browser in real time?
Message-Id: <359412f7.0@news.cadvision.com>

>How to send the part of page to browser for user's viewing other than one
page
>is sent to browser when whole page is completed.


Two things:
1) Tell Perl not to send things as soon as it can:
    $| = 1;
2) Tell you web server not to store the CGI output, but instead send it
immediately
    (for Apache, start you script with 'nph-', which stands for
non-parsed-header).

--
Darrell Nash
Senior Systems Developer
First International Financial Corporation
nash@freerealtime.com





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

Date: 26 Jun 1998 21:50:51 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Increasing page block size for Perl DBMs
Message-Id: <898898355.7207@thrush.omix.com>

[posted & mailed]

Tom O'Neil <tom@netoutfit.com> wrote:
	>snip<
: Is there a way that I can increase the page block size for just
: this DBM or program?

	Use a DBM lib that supports unlimited block size, such as Berkeley
	DB (aka DB_File) or GNU DBM (aka GDBM_File).  See perldoc AnyDBM_File
	for a complete comparison of the different libs available and how
	to use them.

	Berkeley DB is probably the best for most uses (small, fast,
	portable, reliable, packed with features), but getting it to
	compile on some systems can be as much fun as banging your head
	on the wall...

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: Fri, 26 Jun 1998 17:09:36 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Linked list and a code challenge
Message-Id: <1db8j5z.5rflvv16r6a4gN@slip166-72-108-88.ny.us.ibm.net>

Snowhare <snowhare@devilbunnies.org> wrote:

> Ah. Here is a code challenge for everyone:
> 
> Given a finite linked list similiar the one I drew above, determine
> if a *loop* exists in the linked list with the smallest possible
> use of memory (scratch variables) and CPU (in other words the
> lowest order computational complexity). You should return the
> list element where the loop occurs ('b' in the example above) or
> null if no loop is present. The linked list is in the form
> of a hash ($hsh{'1022'} => '3421'; $hsh{'3421'} => '54532';, and
> so on). The loop may be any size up to and including the entire
> linked list or as small as 2 elements linked together at the tail.

#!perl -w

sub hasloop ($) {
  my ($h) = @_;
  my %seen = ();

  foreach (keys %$h) {
    $seen{$h->{$_}}++;
    return 1 if $seen{$h->{$_}} > 1;
  }
}

sub hasmiss ($) {
  my ($h) = @_;
  my %seen = ();

  foreach (keys %$h) {
    return 1 unless exists $h->{$h->{$_}};
  }
}

sub hasorph (%) {
  my %h = reverse @_;
  my %seen = ();

  foreach (keys %h) {
    return 1 unless exists $h{$h{$_}};
  }
}

%ll1 = qw{
 1 2
 2 3
 3 5
 4 5
 5 5
};

print "\%ll1 does@{[hasloop(\%ll1) ? '' : 'n\'t']} contain a loop.\n";
print "\%ll1 does@{[hasmiss(\%ll1) ? '' : 'n\'t']} have missing
elements.\n";
print "\%ll1 does@{[hasorph(%ll1) ? '' : 'n\'t']} have loose
elements.\n";

__END__

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: Fri, 26 Jun 1998 17:30:48 -0400
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: MacPerl and odd filenames
Message-Id: <schinder-2606981730490001@schinder.clark.net>

In article <1db7evh.pmqh1bfzvm72N@bay1-271.quincy.ziplink.net>,
rjk@coos.dartmouth.edu (Ronald J Kimball) wrote:

}  [posted and mailed]
}  
}  Bob MacDowell <bobmacd+cmp@netcom.com> wrote:
}  
}  >   Opening -:<RE>QuickMail problems\ -     <--Error! Can't open!! [...]
}  > 
}  > Notice the trailing blanks.  It wasn't the "/" after all.   Now, I think
}  > blanks are perfectly legitimate parts of a filename, even trailing ones.
}  > But obviously MacPerl didn't.
}  
}  From perlfunc:
}  
}    open FILEHANDLE,EXPR  
}    open FILEHANDLE 
}  
}       [...]
}  
}      The filename that is passed to open will have leading and trailing
}      whitespace deleted.  To open a file with arbitrary weird characters
}      in it, it's necessary to protect any leading and trailing whitespace
}      thusly:
}  
}          $file =~ s#^(\s)#./$1#;

This is a Unix style fix, and doesn't work in MacPerl. ./ doesn't mean
anything special to MacOS.  The equivalent for a single file name used as
a relative path is to put a : at the beginning.

}          open(FOO, "< $file\0");

However, the appending of \0 works in MacPerl to protect trailing whitespace.

The alternative is to use sysopen, which doesn't do any interpretation of
the file name.

-- 
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@leprss.gsfc.nasa.gov


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

Date: 26 Jun 1998 21:01:47 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Replacing "stuff" via Regex... HELP!
Message-Id: <eli$9806261654@qz.little-neck.ny.us>

In comp.lang.perl.misc, F.Quednau <quednauf@nortel.co.uk> wrote:
> > ie. if the input line was
> > data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
> > words",text
> > the output would be
> > data,data,data,number,text,,data, stuff,,stuff,text,,text
> What about this?

What about it? Did you try it before posting? It doesn't work.

> $_ = 'data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
> words",text';
> s/".*",//;

The .* is greedy and will match <string",data, stuff,"nuther",stuff,text,"two
words>. (Assuming that \n isn't really there, otherwise it will just match
<string",data, stuff,"nuther>.)

Grep for "comma-separated" in the perl FAQ. Read the answer. After
splitting on the commas, clear the quoted fields and join them again.

Elijah
------
doing it with one s/// would not be easy


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

Date: Fri, 26 Jun 1998 17:33:08 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Replacing "stuff" via Regex... HELP!
Message-Id: <comdog-ya02408000R2606981733080001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35940051.EBE9A540@nortel.co.uk>, "F.Quednau" <quednauf@nortel.co.uk> posted:

>> ie. if the input line was
>> data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
>> words",text
>> the output would be
>> data,data,data,number,text,,data, stuff,,stuff,text,,text
>
>What about this?
>
>$_ = 'data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
>words",text';
>s/".*",//;
>print $_."\n";

for that snippet, my perl (5.004_04) gives me

   data,data,data,number,text,text

what does your perl do? :)

-- 
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 T-shirts! <URL:http://www.pm.org/tshirts.html>


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

Date: Fri, 26 Jun 1998 21:52:25 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Replacing "stuff" via Regex... HELP!
Message-Id: <tKUk1.2$44.51033@news2.voicenet.com>

F.Quednau <quednauf@nortel.co.uk> wrote:
>> ie. if the input line was
>> data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
>> words",text
>> the output would be
>> data,data,data,number,text,,data, stuff,,stuff,text,,text
>
>What about this?
>
>$_ = 'data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
>words",text';
>s/".*",//;
>print $_."\n";

It won't work.  Well, it'll work, but not right. :)

I'm going to take the liberty of shortening this string.

s/".*",// will match:

	 +---- From here to here -----+
         |                            |
'one,two,"string",three,four,"another",five';

Remember, .* is _greedy_.

This pattern should work:
s/"[^"]+"//g;

-- 
Matt Knecht - <hex@voicenet.com>
"496620796F752063616E207265616420746869732C20796F7520686176652066
617220746F6F206D7563682074696D65206F6E20796F75722068616E6473210F"


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

Date: Fri, 26 Jun 1998 22:07:13 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Replacing "stuff" via Regex... HELP!
Message-Id: <6n15g9$b57$1@rand.dimensional.com>

[posted and mailed to the cited author]
In article <35940051.EBE9A540@nortel.co.uk>
"F.Quednau" <quednauf@nortel.co.uk> wrote:

>What about this?
>
>$_ = 'data,data,data,number,text,"string",data, stuff,"nuther",stuff,text,"two
>words",text';
>s/".*",//;
>print $_."\n";
>
Hmmmmmm... but it doesn't work.  If your string really has newlines
in it this will work (if it doesn't have newlines you can leave off
the /s)-
 s/".*?"//gs;

>Frank Quednau               

Daniel
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: 26 Jun 1998 16:02:23 -0500
From: tye@fiinix.metronet.com (Tye McQueen)
Subject: Re: syswrite behavior on Win32
Message-Id: <6n128v$e41@fiinix.metronet.com>

nielson@macsch.com (Michael Nielson) writes:
) 
) I'm seeing different behavior of the syswrite function when I compare
) various versions of perl on Win32.  Some versions (or builds?) will
) convert the output string "\n" to "\r\n", some do not.  For example, I
) have a 5.002 executable that does not do the conversion.  But I have a
) 5.004 binary that does.

My 10-second checked indicates all versions use C's write()
for Perl's syswrite().  So I'd guess this is a difference in
the C library of the different compilers used to build the
different versions you have.  Interesting...
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

Date: 26 Jun 1998 22:56:46 GMT
From: ronaldws@aol.com (RonaldWS)
Subject: unrecognized attribute from DBI object hash ref
Message-Id: <1998062622564600.SAA23495@ladder01.news.aol.com>

I am trying to inherit from a DBI::st and add some new attributes to the
objects by assigning to the object hash.   When I try I get the error in the
subject of the message 'unrecognized attribute'.  Does anyone know why and how
to get around this?  This is with an Oracle DBD under perl5.004 and HP-UX.

The code goes something like this.

Early in the module I have

package dbCursor;

@ISA = qw( DBI::st );

sub new {
   my $self = shift;  
   my $dbh = shift;  # a DBI::db handle created with DBI->connect(...);
   my $sql = shift;

   my$class = ref($self) || $self;

   my $obj_ref = dbh->prepare($sql);

   if ($obj_ref) {
       $obj_ref->{'SQL'} = $sql;  # dies here  
   }
   bless  $obj_ref, $class;
}

All hints appreciated,
Ronald Schmidt


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

Date: 26 Jun 1998 16:32:59 -0500
From: tye@fiinix.metronet.com (Tye McQueen)
Subject: Re: WARNING: Newbie Inquiry - PERL Architecture
Message-Id: <6n142b$m16@fiinix.metronet.com>

) Fredrick V. Brock wrote in message <3592DE9F.94A481B1@mycitypages.com>...
) >Is it better to interrelate the 12 individual files that contain sub
) >routines using 'do' statements; or,
) >
) >Is it better to interrelate the individual files into one (rather long)
) >file.  Granted, without PERL knowledge, the concept of a long file is
) >nebulous and subjective.  With minimal but adequate use of white space
) >to facilitate human interpretation, the resulting single file will be
) >approximately 9,000 lines long.

Neither.  Don't use "do"; there is almost always a better way
(and I'm talking about all of the different meanings of "do").

Break the subroutines into related groups and put each group into
a separate *.pm file and use "require".

"Phil" <phillipu@home.net> writes:
) Hmmmm.....distracted by the stereotype of guru intolerance. Lot's of nice
) folks out here who were once upon a time newbies themselves. Try again.
) 
) Regards,
) 
) P.
) 
) >Disclaimer:
) >
) >Inasmuch as it appears there is a marked and ongoing dichotomy in views
) >among the participants in clpm;  I suggest that those of you who find
) >newbie questions a nuisance, STOP HERE!  READ NO FURTHER! MOVE ON TO THE
) >NEXT POST!  However, for those who care to offer comment on what may be
) >prove to be a rhetorical PERL question, or even a dreaded general
) >programming question, please continue.
) >
) >Hopefully, the above Disclaimer will abate all the 5 alarm flamings that
) >would have otherwise been  issued by the socially challenged, PERL
) >retentive gurus.  There really should be a clp.newbie group.

I guess Phil hasn't been reading as many posts from Tom C. and
a few others as I have.  There is way too much unnecessary and
unnecessarily harsh flamage of perceived "newbies" going on in
c.l.p.misc.

Tom C. certainly contributes a great deal to the Perl community,
but recently his _biggest_ contribution to c.l.p.misc is lots of
off-topic and unhelpful flames, many of which started big flame
threads.  I hope the keepers of c.l.p.moderated will be able to
realize which of Tom's flames are on-topic and helpful and which
are just his knee-jerk reactions to his particular set of biases.

I happen to agree with a lot of his biases, and think that many of
even his all-flame posts belong in c.l.p.*.  But when he or others
post a message that doesn't cover anything other than their non-Perl
biases, I'm embarrassed for them and don't like the reputation they
are giving to the c.l.p.misc part of the Perl community.

Yes, there is a problem with too many posts that are answered in
the docs and FAQs.

On the other hand:

Fredrick, if you want c.l.p.newbies, then go create
alt.lang.perl.newbies and hang out there.  If it works out well
then you can use its success to get c.l.p.newbies created.  I
doubt it will work out but at least it would reduce the amount
of flamage from the perceived gurus to the perceived newbies.
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

Date: 26 Jun 1998 17:23:51 -0500
From: tye@fiinix.metronet.com (Tye McQueen)
Subject: Re: What a Crappy World (oh, yes!)
Message-Id: <6n171n$51g@fiinix.metronet.com>

pd wilson <pdw@plutonium.not> writes:
) Olga, I'm going to put this as simply as possible.  
) You don't own this newsgroup.  You don't contribute to this newsgroup.
) If you don't like it, GET THE FUCK OUT. 

You kiss your mother with that mouth??  This type of stuff is
uncalled for and certainly illustrates Olga point.

) Tom Christiansen is a living god.  Deal with it.

Tom C. is a great Perl hacker and lately he's a mostly lousy
c.l.p.misc poster.  I'm sorry to rain on your hero worship.

Then again, your post was probably just a troll.
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

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

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