Curious Differences

2003-11-09 Thread ben . eisel
I'm getting different results from the same expression on two different machines. Systems --- SunOS qmprod 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-4 SunOS prd-s01 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Fire-880 Perl Instances -- prd-s01: perl 5.8.0 ; perl 5.004_05 ; perl

Re: Why would objects change

2003-11-09 Thread Dan Anderson
> I have a feeling you've done > > Module::new(args...) > > instead of > > Module->new(args...) > > The first way is erroneous. The second way is correct. Yes, that's it. Thank you. Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is it Possible: Caching Perl Compilations

2003-11-09 Thread Jeff 'japhy' Pinyan
On Nov 9, Dan Anderson said: >Is it possible to cache Perl compilations on a web server so that it >runs faster? Yes, it's called mod_perl, and it's a module for the Apache web server. See the Apache web site (http://www.apache.org/). -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://ww

Re: Why would objects change

2003-11-09 Thread Jeff 'japhy' Pinyan
On Nov 9, Dan Anderson said: >I had a function that blessed a Hash into it's class. Oddly, I started >having problems. On dumping the hash I found it had been blessed into a >part of the hash. > >bless {foo => "bar"}, "class"; >became >bless {foo => "bar"}, "bar"; >when the modules constructor w

Is it Possible: Caching Perl Compilations

2003-11-09 Thread Dan Anderson
Is it possible to cache Perl compilations on a web server so that it runs faster? Thanks in advance, -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl interface

2003-11-09 Thread Dan Anderson
Go to safari.oreilly.com . Get one of their 14 day trial subscriptions and the book Learning Perl or Learning Perl for Windows (something like that). If you get through it and understand it pick up the book Learning Perl for Bioinformatics or one of the other ones there. -Dan On Sun, 2003-11-09

Re: Perl interface

2003-11-09 Thread A L
yomna el-tawil <[EMAIL PROTECTED]> wrote: Hi all, i'm a new user for PERL, i even didn't start using it since i'ven't got the editor yet... I wanted to ask if it's possible to make a user friendly interface using PERL, as for example the Dialogs or forms in the Visual C++. Yes (check out C

RE: How best to grab SQL table names?

2003-11-09 Thread Tim Johnson
I think you have an extra '/' in there for an m// operation. Also, maybe I'm just looking at this wrong, since I wasn't following the whole thread, but wouldn't that be the same as this? while( $_ !~ /\(/ ){ which (purely my opinion) is a little easier to read? -Original Message---

Re: How best to grab SQL table names?

2003-11-09 Thread Dan Anderson
oops that should be while (not ($_ =~ m/\(//)) { # match the first parenthesis and not: while (not ($_ =~ m/)//)) { # match last parenthesis My apologies, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How best to grab SQL table names?

2003-11-09 Thread Dan Anderson
I've got a script that goes through SQL files and returns an array of table names. To find table names I use: while ($_ = ) { if ($_ =~ m/CREATE.*TABLE/) { $_ = $'; while (not ($_ =~ m/)//)) { # match last parenthesis $_ .= ; } my $table_name = $`; $table_name = tr/

Re: Inserting Line Number

2003-11-09 Thread James Edward Gray II
On Nov 9, 2003, at 3:56 PM, Raghu Murthy wrote: I would like to insert line numbers for all the files in a directory. So if a directory contains files like foo.c, foo.c1, foo.c2, foo.c3, foo.c4, I am trying to see and choose one of the numbers to process it. 1. foo.c1 2. foo.c2 3. foo.c3 4. foo

Inserting Line Number

2003-11-09 Thread Raghu Murthy
I would like to insert line numbers for all the files in a directory. So if a directory contains files like foo.c, foo.c1, foo.c2, foo.c3, foo.c4, I am trying to see and choose one of the numbers to process it. 1. foo.c1 2. foo.c2 3. foo.c3 4. foo.c4 Can I use __LINE__ or $. to do that or am I

Re: Module Object and sub module function

2003-11-09 Thread R. Joseph Newton
"Gupta, Sharad" wrote: > Maybe OT. But just curious. What do the experts say about exporting function from OO > modules??. > Everytime i need something like this, i end up making those functions as Class > methods. > > -Sharad In most cases, you should. Access through an object provides contex

Re: Module Object and sub module function

2003-11-09 Thread R. Joseph Newton
Dan Muey wrote: > > > Basically I use the ParentName's $obj inside my functions > and they are expecting it as the first arg. > > $obj->MyModule::function($arg); would be the coolest way > (leaving my functions as sub function instead of sub > NameSpace::Evil::function) > > Is this possible or am

Re: Module Object and sub module function

2003-11-09 Thread R. Joseph Newton
Dan Muey wrote: > Howdy folks, > > Yet another module question. > > I'm so close and I've done this but I can't get it to work. > > I am writing a module that is an extension/sub module of an existing module. > > use ... MyNewSexxySubModule qw(function); > > $obj = new->Original::Package(); > for(

Re: Why would objects change

2003-11-09 Thread James Edward Gray II
On Nov 9, 2003, at 2:07 PM, Dan Anderson wrote: I had a function that blessed a Hash into it's class. Oddly, I started having problems. On dumping the hash I found it had been blessed into a part of the hash. i.e. bless {foo => "bar"}, "class"; became bless {foo => "bar"}, "bar"; when the mod

Re: Perl interface

2003-11-09 Thread James Edward Gray II
On Nov 9, 2003, at 11:14 AM, yomna el-tawil wrote: Hi all, i'm a new user for PERL, i even didn't start using it since i'ven't got the editor yet... Any text editor will work. I can't think of a modern OS that doesn't come with one. I wanted to ask if it's possible to make a user friendly inter

Re: Web-based calendar script

2003-11-09 Thread R. Joseph Newton
Tore Aursand wrote: > On Thu, 30 Oct 2003 17:18:06 -0500, William.Ampeh wrote: > > I am looking for a Web-based calendar manager [...] > > What excactly is a calendar manager? To me it sounds like software (web > based, this time) which manages calendars. Do you really have that many? :-) Proba

Re: Data::Dumper->dump()ing a hash?

2003-11-09 Thread R. Joseph Newton
Kevin Pfeiffer wrote: > So in plain(er) English that means: if the name begins with an "*", the > output type will match that of the referenced variable"? Too complicated, and too "cute" to be practical. This would be much simpler if all three of you were taking advice that is often given here:

Why would objects change

2003-11-09 Thread Dan Anderson
I had a function that blessed a Hash into it's class. Oddly, I started having problems. On dumping the hash I found it had been blessed into a part of the hash. i.e. bless {foo => "bar"}, "class"; became bless {foo => "bar"}, "bar"; when the modules constructor was called by another module.

Re: Data::Dumper->dump()ing a hash?

2003-11-09 Thread R. Joseph Newton
Tore Aursand wrote: > On Thu, 30 Oct 2003 23:45:25 +0100, Kevin Pfeiffer wrote: > > print Dumper(\$hash_ref); > > I guess $hash_ref already _is_ a hash reference, so you don't need to > reference it again; > > print Dumper( $hash_ref ); > Probably not. If it had been he would have gotten bette

Re: indirect file access

2003-11-09 Thread Kevin Pfeiffer
Hi Felix, In article <[EMAIL PROTECTED]>, Aerfx wrote: > I want to open a file (testmesg.txt) for reading and writing. Ok, > normally that is no problem ;) > But my script runs by "www-data" and the file I want to edit belongs the > user "testuser" and > lays in /home/testuser/testmesg.txt. So I h

Re: Perl interface

2003-11-09 Thread Hacksaw
There are a variety of library bindings to Perl for the well known GUI libraries, so you shouldn't have a problem finding something to work with. I know Perl has bindings to at least Tk, Gtk+ and Qt. I'd be shocked if most of the major libs aren't covered. I'm curious as to whether anyone has a

Re: Perl interface

2003-11-09 Thread John
Of course. Use the Perl/Tk (ToolKit). There is a relevant mailing list for that. - Original Message - From: "yomna el-tawil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 09, 2003 7:14 PM Subject: Perl interface > Hi all, i'm a new user for PERL, i even didn't start

Perl interface

2003-11-09 Thread yomna el-tawil
Hi all, i'm a new user for PERL, i even didn't start using it since i'ven't got the editor yet... I wanted to ask if it's possible to make a user friendly interface using PERL, as for example the Dialogs or forms in the Visual C++. If not,, is it possible to take the output from perl and make the i