RE: Module Object and sub module function

2003-10-29 Thread Kevin Pfeiffer
Hi Dan, In article <[EMAIL PROTECTED]>, Dan Muey wrote: > Sorry for the confusion, I was switching example names on everyone. > > I think I've got it. > > I've made it object oriented and functional based. (Gulp, kinda scary :-)) > > I have > > package Parent::Module::MyModule; You may not n

RE: Module Object and sub module function

2003-10-29 Thread Gupta, Sharad
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 > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2

RE: What's the Perl driver for MSAccess?

2003-10-29 Thread Tim Johnson
Install DBI and DBD::ODBC. Then you should be able to do something like this: use DBI; my $dbh = DBI->connect("dbi:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=PLACE_DB_NAME_HERE", '','') || die "$DBI::errstr\n"; my $sthCreateTable = $dbh->prepare( q{CREATE TABLE 'MAIN' (server varchar(50),s

Re: script to test a file.

2003-10-29 Thread Brian Gerard
And the clouds parted, and Wiggins d Anconia said... > > > > Rick Bragg wrote: > > > Hi, > > > > > > I want to write a script that will test the contents of a file. > > > > > > The file being tested will pass only if it contains nothing more > than an > > > ip address on one line. Does anyone

Re: What's the Perl driver for MSAccess?

2003-10-29 Thread Bob X
"Scott E Robinson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone tell me what the Perl driver for MSAccess is called and how to > use it to read a table? > > Thanks, > > Scott > > Scott E. Robinson > SWAT Team > UTC Onsite User Support > RR-690 -- 281-654-5169 > EMB-2813N

RE: Module Object and sub module function

2003-10-29 Thread Dan Muey
Sorry for the confusion, I was switching example names on everyone. I think I've got it. I've made it object oriented and functional based. (Gulp, kinda scary :-)) I have package Parent::Module::MyModule; With simply bare function names like so: (IE not Parent::Module::functionname {} so as n

Range of dates help needed

2003-10-29 Thread Kevin Old
Hello everyone, I have a subroutine below that uses Date::Manip to build a hash with keys of the previous Wednesday to the next Tuesday range from the beginning of the year until today. For instance: %pairs = ( #didn't want to list the whole year, but you get the point '10/15/2003' => '10/21/200

Re: finding out my IP address..

2003-10-29 Thread denis
On Wed, 29 Oct 2003 [EMAIL PROTECTED] wrote: > > > > >> Hi, > >>I'm trying to find my IP address from within Perl for eth0 and ppp0. > >> Currently I run a regex on the output of ifconfig to extract his data - > >> but, I'd like to do this from within Perl and it strikes me that this > >> s

Re: Visual Perl

2003-10-29 Thread Jenda Krynicky
From: "Ned Cunningham" <[EMAIL PROTECTED]> > I just finished up with a Perl program using Win32::Console on a > Windoze NT system, Perl ver 5.6.1. > > I was wondering why with all the power of Perl, and all the > functionality it has, why I cant make a pretty input window? Apart from Tk that has

Re: What's the Perl driver for MSAccess?

2003-10-29 Thread Shiping Wang
At 10:22 AM 10/29/2003 -0600, [EMAIL PROTECTED] wrote: Can anyone tell me what the Perl driver for MSAccess is called and how to use it to read a table? Thanks, Scott Scott E. Robinson SWAT Team UTC Onsite User Support RR-690 -- 281-654-5169 EMB-2813N -- 713-656-3629 -- To unsubscribe, e-mail: [E

Re: script to test a file.

2003-10-29 Thread Robert Citek
At 11:43 AM 10/29/2003 -0600, Andrew Gaffney wrote: Rick Bragg wrote: Hi, I want to write a script that will test the contents of a file. The file being tested will pass only if it contains nothing more than an ip address on one line. Does anyone have a sample of a simple regex to accomplish thi

Re: Question on transliteration

2003-10-29 Thread Jenda Krynicky
From: Stefan Lidman <[EMAIL PROTECTED]> > >Can someone translate into English: > > > >($filename) = $file =~ m!([^/]*)$!; > > > > > >Why is $filename in parens? > > The parens put $filename in list context so that it contains whatever > is after the last '/'. This sentence may be a little mislead

RE: Module Object and sub module function

2003-10-29 Thread Dan Muey
> > > Any ideas what I'm missing ?? > > > > You've missed showing us where you've screwed up! > > > > Cheers, > > > > Thank god Rob wrote this, I thought I had been asleep for > about 6 months and there was a whole new way to access into a > symbol table looking for a class constructor!! Jus

Re: finding out my IP address..

2003-10-29 Thread Rob Dixon
Kevin Bewley > >I'm trying to find my IP address from within Perl for eth0 and ppp0. > Currently I run a regex on the output of ifconfig to extract his data - > but, I'd like to do this from within Perl and it strikes me that this > should be possible. Hi Kevin. This is from perldoc -q "IP

Re: Module Object and sub module function

2003-10-29 Thread Wiggins d Anconia
> Hi Dan. > > There's a few things wrong here, and I'm struggling to work out what you're > trying to do. > > Dan Muey wrote: > > > > 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

Re: script to test a file.

2003-10-29 Thread Jerry Rocteur
On Wednesday, Oct 29, 2003, at 19:43 Europe/Brussels, Wiggins d Anconia wrote: Rick Bragg wrote: Hi, I want to write a script that will test the contents of a file. The file being tested will pass only if it contains nothing more than an ip address on one line. Does anyone have a sample of a

Re: Module Object and sub module function

2003-10-29 Thread Rob Dixon
Hi Dan. There's a few things wrong here, and I'm struggling to work out what you're trying to do. Dan Muey wrote: > > 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. > > u

RE: Issue

2003-10-29 Thread Bruce_Phillip
Hi, It has come to my attention that I need a little understanding of what I'm doing here. Gary has provide some overview but not Technical detail as I would like to have. That isn't his fault. I admire his feedback for sure. The code is obvious using hash. This is something I think I n

RE: Module Object and sub module function

2003-10-29 Thread Dan Muey
> I guess by extension you mean that you are trying to subclass > a module. In that case you would need to inherit from that Yeah I guess that is the term. > parent class with something like: > > our @ISA = qw(ParentClass) > > or > > use base qw(ParentClass) > > Then you can call the meth

Re: script to test a file.

2003-10-29 Thread Wiggins d Anconia
> Rick Bragg wrote: > > Hi, > > > > I want to write a script that will test the contents of a file. > > > > The file being tested will pass only if it contains nothing more than an > > ip address on one line. Does anyone have a sample of a simple regex to > > accomplish this? > > /\d+\.\d+\

RE: Module Object and sub module function

2003-10-29 Thread Gupta, Sharad
I guess by extension you mean that you are trying to subclass a module. In that case you would need to inherit from that parent class with something like: our @ISA = qw(ParentClass) or use base qw(ParentClass) Then you can call the methods of the parent class on the instances of this subclass

Module Object and sub module function

2003-10-29 Thread Dan Muey
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(Original::Package::MyNewSexxySubMo

Re: script to test a file.

2003-10-29 Thread Andrew Gaffney
Rick Bragg wrote: Hi, I want to write a script that will test the contents of a file. The file being tested will pass only if it contains nothing more than an ip address on one line. Does anyone have a sample of a simple regex to accomplish this? /\d+\.\d+\.\d+\.\d+\n?/s -- Andrew Gaffney --

RE: DBI

2003-10-29 Thread Tim Johnson
Oh, okay. By the way, you should check out the [EMAIL PROTECTED] list. -Original Message- From: Andrew Gaffney [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 9:18 AM To: [EMAIL PROTECTED] Subject: Re: DBI I had a good reason for doing that. I have information that I need

script to test a file.

2003-10-29 Thread Rick Bragg
Hi, I want to write a script that will test the contents of a file. The file being tested will pass only if it contains nothing more than an ip address on one line. Does anyone have a sample of a simple regex to accomplish this? Thanks Rick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: How to store arrays in hashes or objects?

2003-10-29 Thread Tore Aursand
On Tue, 28 Oct 2003 20:40:07 -0800, Richard Heintze wrote: > I have an array stored in an object and I trying to > compute the length of the array. This seemed to work > initially: > > my $nColumns = [EMAIL PROTECTED]>{component_titles}}}+1; $#array gives to the index of the _last_ element. If y

Re: How Do I initialize an empty array

2003-10-29 Thread Tore Aursand
On Tue, 28 Oct 2003 11:53:44 -0700, Wiggins d Anconia wrote: > or if you know the length of the array ahead of time: > > my @rows = ('','',''); I prefer the following instead: my @rows = ('') x 3; Easier to read...? -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL P

RE: Issue

2003-10-29 Thread Bruce_Phillip
Gary, Basically your code works except for the last 2 lines. I can't for the life of me figure out why. my $OS=(&get_response('uname -n'))[0] or die "OS not found" unless ($OS && defined $whichos{$OS}); my $response=(&get_response($commands{$OS}{'hostname'}))[0]; print OUTPUT_FH ",$response";

Re: DBI

2003-10-29 Thread Andrew Gaffney
I had a good reason for doing that. I have information that I need to get from 2 separate lines in the db. I wasn't able to write a query that could join them together. Tim Johnson wrote: Another way to do it is: while($ref = $sth->fetchrow_hashref){ do something... } -Original Message---

What's the Perl driver for MSAccess?

2003-10-29 Thread scott . e . robinson
Can anyone tell me what the Perl driver for MSAccess is called and how to use it to read a table? Thanks, Scott Scott E. Robinson SWAT Team UTC Onsite User Support RR-690 -- 281-654-5169 EMB-2813N -- 713-656-3629 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: finding out my IP address..

2003-10-29 Thread Kevin . Bewley
>> Hi, >>I'm trying to find my IP address from within Perl for eth0 and ppp0. >> Currently I run a regex on the output of ifconfig to extract his data - >> but, I'd like to do this from within Perl and it strikes me that this >> should be possible. >> >> HELP! ANYBODY! >> > >Well this module

RE: our vs. use vars

2003-10-29 Thread Dan Muey
> Dan Muey wrote: > > > Howdy group, > > > > In developing a module and I am torn. > > > > I want to use the newer our $variable; but to make it work with pre > > 5.6 Perl (or whatever version our appeared in) I have to do the use > > vars qw($variable); method > > > > So I was wanting some

RE: How to send email (perhaps via Exchange Server?)

2003-10-29 Thread Dan Muey
> I am writing a Perl script for Solaris box. The script needs > to send email. The company uses Microsoft Exchange Server, > and the Solaris box Sendmail installed (though I'm having > problems installing Mail::Sendmail from CPAN). > > Any suggestions, please? Yes, do somethgin that won't mat

RE: Determining size of gif or jpg file

2003-10-29 Thread Dan Muey
> I am writing a program to allow pictures displayed, but I > want to limit the > size of the images. How would I determine the size of image > files using perl? > use Imager; use Image::Magick; checkout cpan, it's very simple. I've used both of those modules for all kinds of image manipulati

Re: Determining size of gif or jpg file

2003-10-29 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > I am writing a program to allow pictures displayed, but I want to limit the > size of the images. How would I determine the size of image files using perl? Unsurprisingly, the Image::Size module will probably do what you want :) Cheers, Rob -- To unsubscribe, e

Re: update from select

2003-10-29 Thread Gary Stainburn
On Wednesday 29 Oct 2003 9:11 am, Gary Stainburn wrote: > Hi folks, > > don't know if it's cos of the 17 hours I've just worked (sympath vote > please) but I can't get this one worked out > > I've got table names with nid as name id field and nallowfollow flag. > I've got a vehicles table with vown

Re: finding out my IP address..

2003-10-29 Thread Wiggins d Anconia
> Hi, >I'm trying to find my IP address from within Perl for eth0 and ppp0. > Currently I run a regex on the output of ifconfig to extract his data - > but, I'd like to do this from within Perl and it strikes me that this > should be possible. > > HELP! ANYBODY! > Well this module seems to

Determining size of gif or jpg file

2003-10-29 Thread Jimstone77
I am writing a program to allow pictures displayed, but I want to limit the size of the images. How would I determine the size of image files using perl?

finding out my IP address..

2003-10-29 Thread Kevin . Bewley
Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Kev -- To unsubscribe, e-mail: [EMAIL

Re: How to send email (perhaps via Exchange Server?)

2003-10-29 Thread Gregg O'Donnell
Check out MIME::Lite (easy to install and use). http://search.cpan.org/search?query=MIME%3A%3ALite&mode=all "Gazi, Nasser" <[EMAIL PROTECTED]> wrote: I am writing a Perl script for Solaris box. The script needs to send email. The company uses Microsoft Exchange Server, and the Solaris box Sendmai

Re: initialising a list of variables

2003-10-29 Thread Rob Dixon
Gary Stainburn wrote: > > I've got a query about variable initialisation. I want to initialise a list of > variables to an empty string, but I'm having troubles. > > What's the best wat to do this? > > If I use the following I get: > > [EMAIL PROTECTED] gary]$ cat t > #!/usr/bin/perl -w > > use st

Re: initializing a closure variable

2003-10-29 Thread Rob Dixon
Kevin Pfeiffer wrote: > > In article <[EMAIL PROTECTED]>, Rob Dixon wrote: > > > Kevin Pfeiffer wrote: > >> > >> I would have thought that this would initialize my $indent variable to 2 > >> (like setting an initial state for an object), but if I call "indent()" I > >> get nothing back. :-( > >> >

Re: Regex search question

2003-10-29 Thread Rob Dixon
Paul Harwood wrote: > > I know that > > if ( /VALUE={1}(\d+)/ ) { > > looks for the first occurrence of value. How do I > find the last occurrence? Firstly you don't need the {1} in there. All it's doing is insisting that there is only one equals character, which an unquantified /=/ will do anyw

RE: How do i include a shell script

2003-10-29 Thread Stephen Hardisty
> How do i include a shell script in perl. I have to use some shell scripts in > a perl script. I know I can write it in perl, but would like avoid doing it > at this time, due to shortage of some time. You could execute them as you would any other program. This example uses backticks: `bob.sh`

How do i include a shell script

2003-10-29 Thread Raghu Murthy
How do i include a shell script in perl. I have to use some shell scripts in a perl script. I know I can write it in perl, but would like avoid doing it at this time, due to shortage of some time. Thanks _ Surf and talk on the phon

Re: Net::SMTP auth()

2003-10-29 Thread Josimar Nunes de Oliveira
The sequence is: new() auth() mail() to() data() datasend() dataend() quit() Josimar - Original Message - From: "Dan Muey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 28, 2003 6:33 PM Subject: Net::SMTP auth() Any one know at what point one needs to do auth() i

Regex search question

2003-10-29 Thread Paul Harwood
I know that if ( /VALUE={1}(\d+)/ ) { looks for the first occurrence of value. How do I find the last occurrence? --Paul

Re: our vs. use vars

2003-10-29 Thread Darin McBride
Dan Muey wrote: > Howdy group, > > In developing a module and I am torn. > > I want to use the newer our $variable; but to make it work > with pre 5.6 Perl (or whatever version our appeared in) I > have to do the use vars qw($variable); method > > So I was wanting some input about pros and cons

update from select

2003-10-29 Thread Gary Stainburn
Hi folks, don't know if it's cos of the 17 hours I've just worked (sympath vote please) but I can't get this one worked out I've got table names with nid as name id field and nallowfollow flag. I've got a vehicles table with vowner pointing at nid and a vallowfollow field. How can I update nal

How to send email (perhaps via Exchange Server?)

2003-10-29 Thread Gazi, Nasser
I am writing a Perl script for Solaris box. The script needs to send email. The company uses Microsoft Exchange Server, and the Solaris box Sendmail installed (though I'm having problems installing Mail::Sendmail from CPAN). Any suggestions, please? -- To unsubscribe, e-mail: [EMAIL PROTECTED]