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
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
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
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
"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
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
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
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
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
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
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
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
> > > 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
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
> 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
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
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
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
> 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
> 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+\
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
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
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
--
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
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
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
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
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";
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---
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
>> 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
> 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
> 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
> 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
<[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
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
> 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
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?
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
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
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
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. :-(
> >>
>
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
> 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 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
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
I know that
if ( /VALUE={1}(\d+)/ ) {
looks for the first occurrence of value. How do I find the last occurrence?
--Paul
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
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
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]
50 matches
Mail list logo