I´m a beginner with perl and I need to find the DBI.pm module for Win32.
Does anybody know where I could find it?
use DBI;
@driver_names = DBI->available_drivers;
@data_sources = DBI->data_sources($driver_name, \%attr);
$i=0;
foreach (@driver_names){print i++, ' ', $_, "\n";}
$i=0;
foreach (@data
I have been trying to install a variety of modules and all have failed during
the make portion.
all modules seem to give the same error where a variable is pointed to an
incomplete type. I have recompiled perl, I have recompiled make any ideas on
what I can try. :-(
chuck
***
From: "Matthew C. Peterson" <[EMAIL PROTECTED]>
> while reading the o'eilly book 'learning perl' i came across a section
> dealing with reg. expressions for html. they recommended grabbing a
> robust module from cpan to help with these, but i can't quite seem to
> find one specif
May we assume that you want to apply regexes to HTML to check formedness? Or
are you wanting to detect dangerous HTML in a document? It helps to state
what your goal is. :)
A good module to check out for general HTML mangling might be CPAN's
HTML::Parser which will "recognize markup and sepa
while reading the o'eilly book 'learning perl' i came across a section
dealing with reg. expressions for html. they recommended grabbing a robust
module from cpan to help with these, but i can't quite seem to find one
specifically for this purpose.
any one done this before, or have some direction
From: "Jessee Parker" <[EMAIL PROTECTED]>
> I don't know if this points to a bug in my operating system, a bug in
> my code or if it's normal but basically when I use these modules and
> run a strace (using Linux 7.3) it gives me the following:
>
> 12:28:39 close(3) = 0
> 1
By the way, I've already looked around search.cpan.org, and I couldn't find
anything. Possibly due to the fact that there are about 500 modules which
include the word "access" in the name. If you know of a specific module,
please send me a link or the name. "Try cpan" will not help this time.
You could use a ternary operator here:
$Ans =~ m/u/i ? print "u\n" :
$Ans =~ m/d/i ? print "d\n" :
$Ans =~ m/r/i ? print "r\n" :
(some default);
:)
>= Original Message From Mark Goland <[EMAIL PROTECTED]> =
>Hi guys,
>
>I am trying to implement a switch statment in perl. I have tryed d
Nikola Janceski wrote:
> I need them.. for
>
>
> print FILEHANDLE (list, of, stuff), next if (condition);
>
you probably just want:
print FILEHANDLE qw(list of stuff) and next if(condition);
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
I don't know if this points to a bug in my operating system, a bug in my
code or if it's normal but basically when I use these modules and run a
strace (using Linux 7.3) it gives me the following:
12:28:39 close(3) = 0
12:28:39 munmap(0x400c8000, 4096) = 0
12:28:39 clo
I would use withe DBD::ODBC (with DBI), or Win32::OLE (with ADO).
That assumes that you have worked with either DBI or Microsoft's ADO.
You could also use Win32::OLE to directly access the Access API, but I
have no experience with that.
Rob
-Original Message-
From: [EMAIL PROTECTED]
Ooops, I think I misunderstood the question in my last post. That will
teach me to read the whole post first!
Anyway...
What does that $where in your code come from? It is in the for() statement.
Shouldn't it be $Ans?
I would do it more like this...
print "Enter the command: ";
chomp(my $inp
Is there a module for this? I have some comma-separated files I need to
input to an Access 97 format mdb. I do not need to define any tables or
anything -- just pump data into an existing structure.
Thank you,
Shawn
**
Thi
At 3:05 PM -0400 10/11/02, James Edward Gray II wrote:
>>> print FILEHANDLE (list, of, stuff), next if (condition);
>>
>> print FILEHANDLE (list, of, stuff);
>> next if (condition);
>But these two examples don't behave the same. The first one prints
>and calls next, only on the condition. T
You might want to try a search on CPAN, there is a switch module there...
http://search.cpan.org/search?query=switch&mode=all
Here is some sample code from the perldoc:
=
use Switch;
switch ($val) {
case 1 { print "number 1" }
case "a"
Hi guys,
I am trying to implement a switch statment in perl. I have tryed doing it 2
way's. For some reason my comparison statments are not working can some one
please look over my code and see if they can point me on the right track ??
Thanx in advance,
Mark
Solution 1:
while( ( $Remainder =
On Fri, Oct 11, 2002 at 02:57:21PM -0400, Larry Coffin wrote:
> >print FILEHANDLE (list, of, stuff), next if (condition);
>
> Why are you using a comma operator here and not just a semi-colon
> to terminate the print statement? I.e. why not:
>
> print FILEHANDLE (list, of, stuff);
> next
Nikola Janceski <[EMAIL PROTECTED]> wrote:
> Is this correct placement of the parenthesis?
>
> print FILEHANDLE (list_of_print_stuff);
>
Not really. It will usually work, but the FILEHANDLE
is the first argument, so it ought to be:
print(FH "foo", "bar");
--
Steve
perldoc -qa.j | perl -
On Friday, October 11, 2002, at 01:57 PM, Larry Coffin wrote:
>> print FILEHANDLE (list, of, stuff), next if (condition);
>
> print FILEHANDLE (list, of, stuff);
> next if (condition);
>
> In both cases, the return value of print() is getting tossed and
> the 'next if (...)' is not depend
On Oct 11, Nikola Janceski said:
>print(FILEHANDLE list, of, stuff, to, print), next if (condition);
>
>which I haven't tested. and do I need another comma in that?... ;) just
>fueling the fire I guess.
That is what you need.
print (FH @args), next if condition;
And no, do NOT put a comma af
Hey Nikola,
My MUA believes you used Internet Mail Service (5.5.2650.21)
to write the following on Friday, October 11, 2002 at 2:40:28 PM.
NJ> I need them.. for
NJ> print FILEHANDLE (list, of, stuff), next if (condition);
This type of thing is common in my code when I am messing aroun
On Friday, October 11, 2002, at 01:45 PM, Tim Musson wrote:
> use strict;
> use warnings;
> print (list_of_print_stuff); # This gives an error
I don't get any error with this, assuming I either make it a proper
declared variable or quote it, in Perl 5.6.0. It's never wrong to use
parenthesis
>print FILEHANDLE (list, of, stuff), next if (condition);
Why are you using a comma operator here and not just a semi-colon
to terminate the print statement? I.e. why not:
print FILEHANDLE (list, of, stuff);
next if (condition);
In both cases, the return value of print() is gett
from the doc I was a little confused and wanted clarification:
Also be careful not to
follow the print keyword with a left parenthesis
unless you want the corresponding right parenthesis
to terminate the arguments to th
Steve Main <[EMAIL PROTECTED]> wrote:
>
> I have a script that will run with the SUID bit set. This of course has
> generated a bunch of problems. As I have been working through them I have
> come across one that I just can't seem to figure out.
>
> I want to get this ( or some equivalent) to
Hey Nikola,
My MUA believes you used Internet Mail Service (5.5.2650.21)
to write the following on Friday, October 11, 2002 at 2:28:27 PM.
NJ> Is this correct placement of the parenthesis?
NJ> print FILEHANDLE (list_of_print_stuff);
The best thing to do is look at perldoc, and try it
In that case yes, I believe you have it right. It's the indirect
method call syntax, as far as I understand. Personally though, I would
prefer to see your example as:
if (condition) {
print FILEHANDLE list, of, stuff;
next;
}
TMTOWTDI though, of course.
James
On Friday, O
On Fri, Oct 11, 2002 at 10:10:22AM -0700, david wrote:
> Sudarshan Raghavan wrote:
>
> > On Thu, 10 Oct 2002, John W. Krahn wrote:
> >
> >> What version of Perl are you using?
> >
> > perl 5.8.0
>
> cool. no time for 5.8.x yet.
>
> >
> >> $ perl -Mstrict -wle'@+ = qw/b c d/;(my $name = q/a
I need them.. for
print FILEHANDLE (list, of, stuff), next if (condition);
> -Original Message-
> From: James Edward Gray II [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 2:39 PM
> To: Nikola Janceski
> Cc: Beginners (E-mail)
> Subject: Re: Is this correct? print syntax
>
Parenthesis are optional for pre-defined subroutines, like Perl's
built-in, so most users just leave them off when they're not needed:
print FILEHANDLE list, of stuff, to print;
On Friday, October 11, 2002, at 01:28 PM, Nikola Janceski wrote:
> Is this correct placement of the parenthesis?
>
Is this correct placement of the parenthesis?
print FILEHANDLE (list_of_print_stuff);
Nikola Janceski
The straightest path is not the path of experience.
-- Nicky J. from da' Bronx
The views and
You need the program name, hence the $0. But you've wrapped the path in
backticks, which Perl interprets as an OS command. I think you mean single
quotes, but double quotes are better for $0 interpolation:
my $oraProgName = "/path/to/$0";
You could also use the caller function, for example:
Hello list,
I have a script that will run with the SUID bit set. This of course has
generated a bunch of problems. As I have been working through them I have
come across one that I just can't seem to figure out.
I want to get this ( or some equivalent) to work:
$oraProgName = `/usr/bin/ba
Alex Chen wrote:
> hi, all
>
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how
> to use it.please help!!!
>
> thanks
> alex chen
try this:
#!/usr/bin/perl -w;
use strict;
my $line='';
my $byte='';
o
Sudarshan Raghavan wrote:
> On Thu, 10 Oct 2002, John W. Krahn wrote:
>
>> What version of Perl are you using?
>
> perl 5.8.0
cool. no time for 5.8.x yet.
>
>> $ perl -Mstrict -wle'@+ = qw/b c d/;(my $name = q/a b c d efg/) =~
>> s/@+//; print $name' a b c d efg
>
> When I run this on
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Charles Belcher) writes:
>is there an alternative to using DBI and DBD::Oracle to connect to an Oracle
>database to run a simple select statement?
You could run sqlplus from Perl like any other program.
I would find it simpler to use DBI and DB
is there an alternative to using DBI and DBD::Oracle to connect to an Oracle
database to run a simple select statement?
**
Mercantile Bankshares Corporation Confidential Electronic Mail:
The information contained in this message
About the resource load in having the program check once per second, I
Actually though this would be a problem. I only set it that low to 'test'
how bad of a hit I would take. I was really stunned to see just how
efficient perl is. When I checked the memory usage, and CPU time that this
process
At 11:40 AM -0400 10/11/02, mike wrote:
>../build.pl
>/root/cvs/esound # this the output of $dir3
>/
Is your output of 'print "$dir3\n"' :
/root/cvs/esound
/
Or just:
/root/cvs/esound
From your code, I suspect the former since $dir3 is supposed to end
with a "/"
On Fri, 2002-10-11 at 09:14, Michael Fowler wrote:
> On Fri, Oct 11, 2002 at 06:50:00AM +0100, mike wrote:
> > On Fri, 2002-10-11 at 05:36, Michael Fowler wrote:
> > > On Fri, Oct 11, 2002 at 04:16:41AM +0100, mike wrote:
> > > > Unfortunatel chdir does not work
> > >
> > > In what way doesn't it
I'm not familiar with "notes email" or the Win32::OLE module you're
using, so it's unlikely that I can solve your problem. I do have a few
general observations to offer though.
First, checking something like e-mail every one second, may border on
obsessive compulsive behavior!Seriously
Chris Benco said:
> If anyone has any ideas on how to improve this programs stability, how
> to make perl programs more stably in general, or even a possible reason
> why this, or any general purpose program might crash for unknown
> reasons let me know. Looking for input of any kind on this is
> I have installed MIME::Lite without any errors, but when i try to run
> a test program, it gives me an error saying Can't locate object method
> "new" via package "Mime::Lite" at ./mimelite.pl line 5 Here is the
> program.
>
> #! /usr/bin/perl
>
> use MIME::Lite;
>
> $aem = Mime::Lite->new(
From: papapep <[EMAIL PROTECTED]>
> First of all I beg your pardon for such a stupid question, but I'm new
> to programming and also to Perl.
>
> The question is I've got one text message with a great amount of
> numbers, like this:
>
> 238452359002108480468015316510001515641864148120004418
Tom Allison said:
> I'm trying to make a little perl script that reads the subject
> lines from email.
>
> Problem that I see is being able to correctly remove the "bad"
> characters, like embedding perl code into the subject line...
>
> Example:
> Subject: Hello `rm -rf /*` have a nice day!
> W
Below is a perl script I've been working on that logs into and checks a
notes email account for new messages once every second. When it finds a
new message it tests for a password, and if it success it process's the
email. The script will based on what is in the email either run another
script,
Tom Allison wrote:
>
> I'm trying to make a little perl script that reads the subject
> lines from email.
>From files on your HD or from an SMTP server?
> Problem that I see is being able to correctly remove the "bad"
> characters, like embedding perl code into the subject line...
>
> Example
I'm trying to make a little perl script that reads the subject
lines from email.
Problem that I see is being able to correctly remove the "bad"
characters, like embedding perl code into the subject line...
Example:
Subject: Hello `rm -rf /*` have a nice day!
Would, I suspect, be a bad thing to
Hi
I have installed MIME::Lite without any errors, but when i try to run a test program,
it gives me an error saying
Can't locate object method "new" via package "Mime::Lite" at ./mimelite.pl line 5
Here is the program.
#! /usr/bin/perl
use MIME::Lite;
$aem = Mime::Lite->new( # error on
Alex Chen wrote:
>
> hi, all
Hello,
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how to
> use it.please help!!!
1) Install http://search.cpan.org/author/URI/File-ReadBackwards-0.98/
use File::ReadBackwards;
my $bw = Fil
use Tie::File;
tie @array, 'Tie::File', "file.txt" or die $!;
my $last_line=$array[$#array];
José.
> -Original Message-
> From: alex chen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 8:57 AM
> To: [EMAIL PROTECTED]
> Subject: how to get the last line of a file
>
>
> hi
alex chen wrote:
> hi, all
>
> i want to know how to get the last line of
> a file .i know the func read has a paramenter offset but i don't know how to
> use it.please help!!!
the easy way (but inefficient):
# read until the last line
open F, "file.txt" or die $!;
$last=$_ while ;
the m
First of all I beg your pardon for such a stupid question, but I'm new
to programming and also to Perl.
The question is I've got one text message with a great amount of
numbers, like this:
23845235900210848046801531651000151564186414812000441848415041848464143995
(There are a lot
Hi, Alex
i suggest the following:
#!/usr/local/bin/perl -w
my $filename = "Your_file_name";
# if you are so lucky to work on Unix
my $lastline = `tail -1 $filename`;
print $lastline;
# if file is small enough to hold in an array
open(FILE, $filename) or die "Can't open $filename.\n";
my @array
hi, all
i want to know how to get the last line of
a file .i know the func read has a paramenter offset but i don't know how to
use it.please help!!!
thanks
alex chen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Fri, Oct 11, 2002 at 06:50:00AM +0100, mike wrote:
> On Fri, 2002-10-11 at 05:36, Michael Fowler wrote:
> > On Fri, Oct 11, 2002 at 04:16:41AM +0100, mike wrote:
> > > Unfortunatel chdir does not work
> >
> > In what way doesn't it work? Are you getting an error? How are you
> > verifying it
56 matches
Mail list logo