OK, officially too :)
2.3 - Are there any rules?
Yes. As with most communities, there are rules. Not many, and ones that
shouldn't need to be mentioned, but they are.
Be nice
No flaming
Have fun
Silvio Luis Leite Santana wrote:
>
> Hi all
> Is there actually a Fun With Perl
> Another approach is to wrap the disconnect in eval, which lets you
capture
> the error rather than having it stop your program:
>
> eval { $dbh->disconnect(); };
>
> If $dbh is not a database handle, the relevant error message will be in
$@.
>
> perldoc -f eval
>
>
I think the eval method i
On Thu, Aug 02, 2001 at 12:51:55PM -0400, Ron Woodall wrote:
> Hi All:
>
> A bit of a conundrum here.
>
> while (attlist[$x] =~ m|
How do you run a command on a unix box
from a perl script
and capture the results??
Like a grep command??
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Thu, Aug 02, 2001 at 02:31:28PM -0400, Bob Showalter wrote:
> P.S. I'm surprised this works with while(). I didn't realize fileglobs
> were magical inside while(), but it appears they are... Is this documented?
Yes, perldoc perlop, in the I/O Operators section (5.6.1 version):
A (file)g
Bob,
I got it from "Perl Black Book" by S. Holzner, section on globs. Very very
good book to learn Perl from, extremely easy to read, excellent for
beginners and I'm not going to know this for a long while but I think it is
an excellent book for intermediate Perl dudes too. End of section rea
--- Paul <[EMAIL PROTECTED]> wrote:
Sorry for the null-mail, ladies and gents.
I apparently hit the wrong button and sent a quoted response to the
list without adding anything to it. I apologize for wasting your time,
mailbox space, and bandwidth. =o)
Now, since I did so:
> --- COLLINEAU Franc
For most purposes, I've found it much easier to just make a system call to
an external program rather than using a Perl module. I've messed with
Compress::Zlib a bit, which is a standard module, but it seemed to be
overkill for what I needed.
For example, if you have WinZip on your box, you can a
On Aug 2, Michael Fowler said:
>You can only print a string. When print is given multiple arguments it
>joins them with $" before printing. This is documented in perldoc -f print.
*Cough* $, not $".
$" is used when you put an array (or array slice) in double quotes.
And, upon checking the
Jon,
Read all the files in the directory then go through them based on the
file ext
and do what you want.
opendir( PROGRAM, "./" );
foreach $program ( readdir( PROGRAM )) {
if( $program =~ ".txt" ) {
### do stuff, given a filename
}elsif( $program =~ ".this" ) {
### do stuff, given
On Thu, Aug 02, 2001 at 12:51:55PM -0400, Ron Woodall wrote:
> Hi All:
>
> A bit of a conundrum here.
>
> while (attlist[$x] =~ m|
Bob-Mike-Jerry,
Thanks guys
Jon
At 01:36 PM 8/2/01 -0500, Jerry Preston wrote:
>Jon,
>
>Read all the files in the directory then go through them based on the
>file ext
>and do what you want.
>
> opendir( PROGRAM, "./" );
> foreach $program ( readdir( PROGRAM )) {
> if( $program =~ ".txt"
--- Ron Woodall <[EMAIL PROTECTED]> wrote:
> Hi All:
Hi, Ron.
> A bit of a conundrum here.
Reformatting (forgive if offensive):
> while (attlist[$x] =~ m|
> -Original Message-
> From: Carlos C.Gonzalez [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 7:35 PM
> To: [EMAIL PROTECTED]
> Subject: Where is DB_File::Lock module?
>
>
> Hi everyone,
>
> I am going absolutely nuts trying to find where to get the
> DB_File::Lock
> mo
Hi everyone,
I am going absolutely nuts trying to find where to get the DB_File::Lock
module. I have looked all over CPAN, have done searches on Google.com
and while there is some info on it I can't find out where to download it.
Does anyone have any suggestions?
--
Carlos
www.internetsuc
On Fri, 3 Aug 2001, Darren Edgerton wrote:
> What i really want to do is use a variable to contain the pipe
> ie
> my $separator = "|";
> my @arr = split(/$separator/,$somevar);
>
> Now:
> $arr[0] = "h"
> $arr[1] = "e"
>
> How do i get the split command to use $separat
Hi! This is the ezmlm program. I'm managing the
[EMAIL PROTECTED] mailing list.
I'm working for my owner, who can be reached
I'm trying to created a multi-threaded server to accomplish some distributed
processing.
While compiling Perl with thread support, I noticed during 'make test' that
io:mul
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 5:10 PM
> To: [EMAIL PROTECTED]
> Subject: input output append
>
>
> HI,
> anyone knows the right syntax for reading and writing
> (appending) to a file.
I assume you mean "open
Try
$Directory=
$file="$directory.$file.txt"; # don't forget to add "\" between dir and
file
open FH, ">$file" or die "Cannot open $file:$!";
print FH "blah \n";
print FH ""blah \n";
print FH ""blah \n";
close FH;
-Original
On Thu, Aug 02, 2001 at 09:20:43AM -0700, Paul wrote:
> print ;
>
> If IN is accessing a large file, does the second syntax try to slurp
> the whole thing into memory before printing it? Or is there some
> internal optimization that doles it through in bufferloads?
AFAIK, print is not special
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
Can I test for the existence of a method without actually calling it?
Basically what I'm trying to do is to verify that $dbh is still a valid
handle.
I want to use this as an assertion test at the start of a function.
# verify that the $dbh is valid
if ( !defined($dbh->disconnect() ) )
{
> -Original Message-
> From: S. Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: Help with Net::Telnet module
>
>
> I am looking for some help debugging a problem with the
> Net::Telnet module
> written by Jay Rogers.
>
> H
> -Original Message-
> From: Jon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: File Handling question - easy
>
>
> I don't know if I sent my first email correctly. Sorry for
> the repeat if I
> did, I'm new :)
>
> Hello,
> The
On Thu, 2 Aug 2001, Shepard, Gregory R wrote:
> Thanks for suggesting the Stonehenge training. That appears to be the best
> route.
> And I understand Larry's feeling regarding certification. As long as you can
> do it, who needs certification? But, of course, its nice to have a little
> framed s
I wrote a module called DBIv that does a 'use DBI ; '.
These are the functions that I defined. This module was written with the
intention of providing 2 things:
- a very simple interface
- database independence
--
Connection Functions:
On Aug 2, Paul said:
>That would be Merlyn (Randall Schwartz) &co. at Stonehenge,
>if you want to call it that.
>But it isn't a certification, I don't think.
>
>Randall?
chop(), if'n you don't mind. ;)
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia b
On Thu, Aug 02, 2001 at 03:46:22PM -0400, Jeff 'japhy/Marillion' Pinyan wrote:
> On Aug 2, Michael Fowler said:
>
> >You can only print a string. When print is given multiple arguments it
> >joins them with $" before printing. This is documented in perldoc -f print.
>
> *Cough* $, not $".
>
>
On Aug 2, Messervy, Joe M said:
>I want to get rid of machine1, machine2, and machine4 as there were no
>matching logs for these events.
>I tried as a test perl -p -i -e 's//nmachine//g' myfile and get the
>following error:
>Illegal division by zero at -e line 1, <> line 1. (and all data is los
On Wed, Aug 01, 2001 at 10:08:13AM -0700, Greg Tomczyk wrote:
>
> Thank you for the response. I must confess that I have been reading the
> Perldocs, but I am having some logic troubles, difficult to understand how
> to use File::Find. I tried using the push routine, but that listed all
> files
On Thu, Aug 02, 2001 at 11:03:23AM -0700, Jon wrote:
> My problem is, I want to do this for a bunch of different patterns (ex.
> ".txt", ".this", ".that").
You could say <*.txt *.this *.that>, or you can use opendir, readdir, and a
regex (perhaps grep).
> How can I make what is inside the angl
I was looking online for information on Perl Certification but only found
people discussing it, and not where to get it. Is certification available?
And who provides the most valid certification?
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
Somebody on the mod_perl mailing list might be able to help you better
than somebody on the begginers perl list. This is a bit OT (okay, it's
way out in left field. If you go to http://perl.apache.com you can sign
up for the list.
#!/usr/bin/Brian Johnson
$job= "Laziness";
$pay=
--- COLLINEAU Franck FTRD/DMI/TAM
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> How can i do to insert several lines in the beginning of a existant
> file ?
>
> Thanks
>
> Franck
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
_
It appears that the only kind of assertion test I could do would be to test
$dbh like this
if ( !defined($dbh) || $dbh eq '' )
{
print "dbh is invalid\n" ;
exit 1
}
Jeff
> Can I test for the existence of a method without actually calling it?
>
> Basically what I'm trying to
I am using the Mail::IMAPClient module and the extension BodyStructure to
connect to Exchange Server 5.5. Everything seems to be working great ( I
love this module ) except for one thing. When I use the BodyStructure
extension, either nothing is being returned in the object or I don't know
how to
Hi!
I would like to store the number of a line whitch corresponds to a string.
How can i do ?
Thanks
FRanck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
It's on cpan:
http://search.cpan.org/search?dist=DB_File-Lock
Hope this helps,,,
Aziz,,,
In article <[EMAIL PROTECTED]>, "Carlos C .
Gonzalez" <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I am going absolutely nuts trying to find where to get the DB_File::Lock
> module. I have look
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 9:44 AM
> To: [EMAIL PROTECTED]
> Subject: Valid DB Handle Assertion Test
>
>
>
> Can I test for the existence of a method without actually calling it?
I don't know. Maybe, but s
Yeah, I read more after I sent the mail... I was thinking that the program
didn't produce any output rather than the cgiwrap error.
Oh well, i guess i'll read the whole problem next time before sending
email
brent
Dear firends,
I have situation were user can upload a file to our web base application.
The problem is with the date of creation. When ever a new file is uploaded,
I need to first check of the file with same name exists. If it exist then i
need to check if it is newer than the file being uploade
hi all.
Is there any good stable graphic debugger for perl?
thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$orginalFile = "c:\\file.txt";
$newFile = "c:\\newfile.txt";
$textToAdd = "New text\nSecond line ofnew text\n";
open IN, $originalFile or die "Can't open $originalFile: $!";
open OUT, ">$newFile" or die "Can't create $newFile: $!";
print OUT $textToAdd;
while() {print OUT};
close IN;
close OU
Have a look a the "Short Guide to DBI" available at perl.com It has an
example with queries.
http://www.perl.com/lpt/a/1999/10/DBI.html
Regards
Robert
- Original Message -
From: "Elie De Brauwer" <[EMAIL PROTECTED]>
To: "Ray Barker" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursda
Hi!
How can i do to insert several lines in the beginning of a existant file ?
Thanks
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi
I really dont understand what is the difference between the patterns and
extended patters.. i think both are doin the same function. But why they
called as extended??
Help pointers in this regard will be really helpful.
Thank you
Regards
Babylakshmi M
___
> good info on using the DBI module (should take you right to prepare):
> http://theoryx5.uwinnipeg.ca/CPAN/data/DBI/DBI.html#prepare
>
> There is also a good O'Reilly book titled "Using the Perl DBI" (or
> something like that) by Alligator Descartes
>
I know of the existence of that book but t
>Extracted from the perl cookbook
>
>use DBI;
>
>$dbh = DBI->connect('DBI:driver:database', 'username', 'auth',
>{ RaiseError => 1, AutoCommit => 1});
>$dbh->do($SQL);
>$sth = $dbh->prepare($SQL);
>$sth->execute();
>while (@row = $sth->fetchrow_array) {
># ...
>}
>$sth->finish();
48 matches
Mail list logo