Re: private method

2007-03-03 Thread Jeff Pang
Seems not useful. $ cat t.pl { package A; use strict; sub _foo { print "hello,world\n"; } } { package B; use strict; A::_foo(); print $A::{_foo},"\n"; # _foo is in A's symbol table } $ perl t.pl hello,world *A::_foo >by convention any function, variable

Re: private method

2007-03-03 Thread Chas Owens
On 3/3/07, Jeff Pang <[EMAIL PROTECTED]> wrote: Does Perl's OO have "private method" like Python and other OO languages? snip Perl does not have such a construct; however, by convention any function, variable, or hash key that begins with an underscore, '_', is considered to be private. It is

Re: Treating a split() as an array

2007-03-03 Thread Rob Dixon
Jay Savage wrote: > > On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >> Jay Savage wrote: >>> >>> On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: I think this is all you do: $piid = (split(/\t/, $row))[0]; >>> >>> Split also takes an optional limit that keeps it from

private method

2007-03-03 Thread Jeff Pang
Does Perl's OO have "private method" like Python and other OO languages? When we say "sub foo { }" in a package 'bar',Perl will insert the "foo" into this package's symbol table,so we can access foo() from anywhere out of the package bar,via the form of "bar::foo()". So I don't think Perl has its

Re: sort and print multiple lines

2007-03-03 Thread Jeff Pang
>> >> Data file below is just made up but illustrates the structure >> >> line1^FC12345^IQ >> line1^FC12345^LD >> line1^FC2345^pq >> line2^FC12345^IQ >> line2^FC12345^LD >> line2^FC2345^pq >> line3^FC12345^IQ >> line3^FC12345^LD >> line3^FC2345^pq >> >> WHEN FINISHED >> line1 >> line2 >> line3 >>

sort and print multiple lines

2007-03-03 Thread Jack Daniels (Butch)
My apologies. I didn't include the correct subject > I have a file containeding data (example) > > I added the text line1 line2 line3 to the beginning of each line in the > hopes I could do the following. > I appended line1 line2 and line3 files to one file, but now I need to sort > them correctl

Re: cgi calender

2007-03-03 Thread Jack Daniels (Butch)
I have a file containeding data (example) I added the text line1 line2 line3 to the beginning of each line in the hopes I could do the following. I appended line1 line2 and line3 files to one file, but now I need to sort them correctly to send these comands to an API transaction server to alter da

Re: Treating a split() as an array

2007-03-03 Thread John W. Krahn
Jay Savage wrote: > On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: >> Jay Savage wrote: >> > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> >> I think this is all you do: >> >> >> >> $piid = (split(/\t/, $row))[0]; >> > >> > Split also takes an optional limit that keeps it from splittin

Re: Treating a split() as an array

2007-03-03 Thread Jay Savage
On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: Jay Savage wrote: > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> I think this is all you do: >> >> $piid = (split(/\t/, $row))[0]; > > Split also takes an optional limit that keeps it from splitting the > string into more than n parts.

Re: Treating a split() as an array

2007-03-03 Thread John W. Krahn
Jay Savage wrote: > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> I think this is all you do: >> >> $piid = (split(/\t/, $row))[0]; > > Split also takes an optional limit that keeps it from splitting the > string into more than n parts. This keeps spilt from performing > useless operations

Re: perldoc strangeness

2007-03-03 Thread Tom Phoenix
On 3/3/07, Jay Savage <[EMAIL PROTECTED]> wrote: perldoc -f doesn't return anything for a number of functions Is this normal behavior? Nope. This sounds like a job for perlbug. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

perldoc strangeness

2007-03-03 Thread Jay Savage
I just noticed something strange with my perldoc (v5.8.6 built for darwin-thread-multi-2level): some perldoc -f doesn't return anything for a number of functions, particularly, it seems, a number of the functions for SCALRs and strings. I noticied it first with chr, but none of the functions below

Re: Treating a split() as an array

2007-03-03 Thread Jay Savage
On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: I think this is all you do: $piid = (split(/\t/, $row))[0]; *Please don't top post.* Split also takes an optional limit that keeps it from splitting the string into more than n parts. This keeps spilt from performing useless operations when