RE: Help needed on perl wrappers

2003-12-09 Thread Pandey Rajeev-A19514
Hi, I was interested in formatted display on screen. I can display ONE text paragraph in any part of the screen with Text::wrap. My question was how to adjust MANY such independent paragraphs in one screen (exactly in a newspaper format where you have 8-10 columns of news items on a single page

RE: Help needed on perl wrappers

2003-12-09 Thread Tom Kinzer
I'm trying to figure out WHY you would ever want to create what you are asking for. Why-- is a good question here, because there may be a way to get to the real goal instead of creating this. For instance if it's just going into an HTML document, a table of course, would be easier. Just an exam

RE: Reading a log file, again = works as desired

2003-12-09 Thread danield
Hello Tom, Thank you very much. I appreciate your help. This script works flawlessly, and does exactly what I need. Thank you for your time. danield >From: "Tom Kinzer" <[EMAIL PROTECTED]> >To: "Beginners Perl" <[EMAIL PROTECTED]> >Subject: RE: Reading a log file, again >Date: Mon, 8 Dec 2003 1

Re: Pattern Match

2003-12-09 Thread Robert Brown
Casey West writes: > : "Does the regular expression mechanism in perl optimize regular > : expressions such as the one you used earlier in this thread so that > : the execution overhead is nearly as good as the C approach I outlined > : earlier in this thread? In other words, for the problem s

Re: Pattern Match

2003-12-09 Thread Casey West
It was Tuesday, December 09, 2003 when Robert Brown took the soap box, saying: : Rob Dixon writes: : > I'm sure you have something useful to say. This seems such a waste of : > your effort. : > : > Rob : : I think we are failing to communicate. What I am asking is: Thanks for the clarificat

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > I'm sure you have something useful to say. This seems such a waste of > your effort. > > Rob I think we are failing to communicate. What I am asking is: "Does the regular expression mechanism in perl optimize regular expressions such as the one you used earlier in this t

Help needed on perl wrappers

2003-12-09 Thread Pandey Rajeev-A19514
Hi, I have a text that I read from a file. I want to display the text on the screen in a column in a newspaper style. I do it like this $initial_tab = "\t\t"; $subsequent_tab = "\t\t"; print wrap($initial_tab, $subsequent_tab, @text1); print fill($initial_tab, $subsequent_tab, @text1); It w

Re: Setting the file permissions of a file I'm writing to

2003-12-09 Thread Steve Grazzini
On Tuesday, December 9, 2003, at 10:53 PM, Dan Anderson wrote: Is it possible to specify the permissions of a file I create when I: open ("FOO", "> ./bar") or die ("Could not create file"); use Fcntl; sysopen(FOO, $path, O_WRONLY|O_CREAT|O_TRUNC, 0750) or die "sysopen: $path: $!"; -- Ste

Re: passing an array

2003-12-09 Thread Mike Blezien
Thanks James, passing as a reference was basically what I was trying to recall, your example made that clear :) -- MikeBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= James Edwa

Re: passing an array

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 8:49 PM, Mike Blezien wrote: Hello, what is the best way to pass an array to a sub routine, IE. my @fields = qw(one two three); send_array(@fields); sub send_array { my @ary = @_; # do stuff here } is this the most effective way to pass an array to sub routine or is t

Setting the file permissions of a file I'm writing to

2003-12-09 Thread Dan Anderson
Is it possible to specify the permissions of a file I create when I: open ("FOO", "> ./bar") or die ("Could not create file"); Thanks in advance, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: removing duplicate lines

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 8:33 PM, Andrew Gaffney wrote: John W. Krahn wrote: Andrew Gaffney wrote: I am writing a Perl script to automatically generate a netlogon.bat file for Samba whenever a user logs onto a domain. The only parameter that is passes to it is the username. My problem is that differen

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 9:08 PM, R. Joseph Newton wrote: UML? Isn't that the stuff the once-long-ago-knew-how-to-code professional sycophants use to make pretty pictures for execs, so that the execs can go to bed in the warm contented illusion that they actually understand something about the system

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread R. Joseph Newton
Wiggins d Anconia wrote: > > please let's do a split(/\s/, "Perl Programmer"). > > > > this return one array with two scalar: > > Perl > > Programmer > > > > that's why > > > > Back to semantics, define "Programmer". Your definition of programmer, > if it requires any knowledge of UML, is so stri

passing an array

2003-12-09 Thread Mike Blezien
Hello, what is the best way to pass an array to a sub routine, IE. my @fields = qw(one two three); send_array(@fields); sub send_array { my @ary = @_; # do stuff here } is this the most effective way to pass an array to sub routine or is there a better way to do this. thx's -- MikeBlez

Re: removing duplicate lines

2003-12-09 Thread Andrew Gaffney
John W. Krahn wrote: Andrew Gaffney wrote: I am writing a Perl script to automatically generate a netlogon.bat file for Samba whenever a user logs onto a domain. The only parameter that is passes to it is the username. My problem is that different groups get some of the same mappings. What I real

Re: Reading a log file, again

2003-12-09 Thread R. Joseph Newton
Tom Kinzer wrote: > -Original Message- > From: R. Joseph Newton [mailto:[EMAIL PROTECTED] > Sent: Monday, December 08, 2003 7:02 PM > To: Tom Kinzer > Cc: Katka a Daniel Dunajsky; Beginners Perl > Subject: Re: Reading a log file, again > > Tom Kinzer wrote: > > > Try this: > > > > Caveat:

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread John W. Krahn
Dan Anderson wrote: > > On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote: > > On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: > > > > > I have 2 Linux boxes I want to talk to each other over the local > > > network > > > using a Perl script. Is it possible to set up a bidirectional pipe so

Re: Problems compiling Perl 5.6.1

2003-12-09 Thread Paul Johnson
On Tue, Dec 09, 2003 at 07:09:15PM -0500, Dan Anderson wrote: > When I try to compile Perl 5.6.1 (can't find any RPMs and, yes, I need > 5.6.1), I get the following error: > > make[1]: Leaving directory `/root/perl-5.6.1/utils' > > Making x2p stuff > make[1]: Entering directory `/root/pe

Re: Pattern Match

2003-12-09 Thread John W. Krahn
Rob Dixon wrote: > > I didn't think it was slick at all. In fact I was disappointed that it looked > such a mess, but I don't see a better way. Anyway, the statement is > > s/([\x00-\1F])/'^'.chr(ord($1) + 0x40)/eg > > where the regex is > > ([\x00-\1F]) Oops. That matches the characters

Re: SMTP From field using MIME::Lite

2003-12-09 Thread Paul Kraus
This code works for me - #!/usr/bin/perl use strict; use warnings; use MIME::Lite; my $msg = MIME::Lite->new( From => '"Paul Kraus" [EMAIL PROTECTED]', To => '[EMAIL PROTECTED]', Subject => 'RE:SMTP From field using

Re: sorter script [was: Frustrated newbie question]

2003-12-09 Thread R. Joseph Newton
drieux wrote: > Ironically, uh, duh, given tassilo's recent thumping > of me for whining about acadamia - there are some > ugly 'sorting algorithms' that have to be 'ugly' > to be 'general enough' that are, well, ugly. Hmmm. I don't know about that. Most sorting algorithms I have seen are quite

Re: Pattern Match

2003-12-09 Thread John W. Krahn
Eric Sand wrote: > > Hi All, Hello, > I am very new to Perl, Welcome. :-) > but I sense a great adventure ahead after just > programming with Cobol, Pascal, and C over the last umpteen years. "Thinking in Perl" may take a while but it is not your grandfather's programming language (sorry

Problems compiling Perl 5.6.1

2003-12-09 Thread Dan Anderson
When I try to compile Perl 5.6.1 (can't find any RPMs and, yes, I need 5.6.1), I get the following error: make[1]: Leaving directory `/root/perl-5.6.1/utils' Making x2p stuff make[1]: Entering directory `/root/perl-5.6.1/x2p' make[1]: *** No rule to make target `', needed by `hash.o'. St

Re: wildcard File::Copy

2003-12-09 Thread Jenda Krynicky
From: Ben Crane <[EMAIL PROTECTED]> > Anyone know how to do a wildcard file::copy? E.g. I > want to copy a file with a certain name but different > extensions. > > I have tried concatenating ".*" to the end of a > filename (without an extension obviously) but it > fails. > This is what I had in mi

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread R. Joseph Newton
Tassilo von Parseval wrote: > The credo of your original message was rather flat and shallow: Avoid > university at all costs because it can't teach you anything worthwhile. > This is an immature statement which I addressed. > > Tassilo Actually, the first message I saw from drieux on this threa

Re: removing duplicate lines

2003-12-09 Thread John W. Krahn
Andrew Gaffney wrote: > > I am writing a Perl script to automatically generate a netlogon.bat file for Samba > whenever a user logs onto a domain. The only parameter that is passes to it is the > username. My problem is that different groups get some of the same mappings. What I > really > need t

Re: Pattern Match

2003-12-09 Thread Rob Dixon
Robert Brown wrote: > > Rob Dixon writes: > > Robert Brown wrote: > > > > > > Rob Dixon writes: > > > > > > > Tom Kinzer wrote: > > > > > > > I didn't think it was slick at all. In fact I was disappointed that > > > > it looked such a mess, but I don't see a better way. > > > > > > Yes

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 4:12 PM, Dan Anderson wrote: Well, I was planning to implement the file transfers using Net::FTP or something similar to keep the problems down. But I want every node to be able to talk to other nodes, i.e. each node be able to send every other node a request to download a file

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > Robert Brown wrote: > > > > Rob Dixon writes: > > > > > Tom Kinzer wrote: > > > > > I didn't think it was slick at all. In fact I was disappointed that > > > it looked such a mess, but I don't see a better way. > > > > Yes, it is indeed a mess, not only syntacticly,

Re: Pattern Match

2003-12-09 Thread Rob Dixon
Robert Brown wrote: > > Rob Dixon writes: > > > Tom Kinzer wrote: > > > I didn't think it was slick at all. In fact I was disappointed that > > it looked such a mess, but I don't see a better way. > > Yes, it is indeed a mess, not only syntacticly, but also semantically. > While it might make a

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread Wiggins d Anconia
> > How many boxes are we talking about here? > > Well starting off, 2. But I would like to expand to several more. > Probably never more then 10. > > > What you're talking about is no small feat. How can we help you? > > > > You want a server and a client, right? Could it be and FTP serve

RE: command line commands passed to perl script?

2003-12-09 Thread Tim Johnson
IMHO, parsing command-line options sounds a lot easier than it is. Definitely use the modules unless you have a good reason for not doing so. The author(s) of the module have probably already dealt with the forehead-slappers that might not be obvious right off the bat, and it will save you a lot

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread Dan Anderson
> How many boxes are we talking about here? Well starting off, 2. But I would like to expand to several more. Probably never more then 10. > What you're talking about is no small feat. How can we help you? > > You want a server and a client, right? Could it be and FTP server and > a script

Re: command line commands passed to perl script?

2003-12-09 Thread John W. Krahn
Ben Crane wrote: > > Hi all, Hello, > Sorry, should have added this to my last email. Does > anyone know how to pass values to a perl script > through the command line? Do you use param as in CGI > scripting/ > > I want a user to be able to specify certain parameters > for the perl script (in c

Re: wildcard File::Copy

2003-12-09 Thread John W. Krahn
Ben Crane wrote: > > Hi all, Hello, > Anyone know how to do a wildcard file::copy? E.g. I > want to copy a file with a certain name but different > extensions. > > I have tried concatenating ".*" to the end of a > filename (without an extension obviously) but it > fails. > This is what I had in

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 3:40 PM, Dan Anderson wrote: On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote: On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: I have 2 Linux boxes I want to talk to each other over the local network using a Perl script. Is it possible to set up a bidirectional pipe so

Re: How do I set up bidirectional pipes over a network connection ?

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 3:49 PM, Dan Anderson wrote: You might look at the standard rdist(1) utility for this kind of thing. For crafting network daemons in Perl, Net::Daemon is a good place to start, IMO. What I am trying to do is too complex to successfully implement using a standard utility like

RE: How do I set up bidirectional pipes over a network connection ?

2003-12-09 Thread Dan Anderson
> You might look at the standard rdist(1) utility for this kind of thing. > > For crafting network daemons in Perl, Net::Daemon is a good place to start, > IMO. What I am trying to do is too complex to successfully implement using a standard utility like rdist or CVS. Besides, rolling my own is

RE: How do I set up bidirectional pipes over a network connection ?

2003-12-09 Thread Bob Showalter
Dan Anderson wrote: > On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote: > > On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: > > > > > I have 2 Linux boxes I want to talk to each other over the local > > > network using a Perl script. Is it possible to set up a > > > bidirectional pipe so t

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread Dan Anderson
On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote: > On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: > > > I have 2 Linux boxes I want to talk to each other over the local > > network > > using a Perl script. Is it possible to set up a bidirectional pipe so > > that 2 perl daemons can comm

Re: Pattern Match

2003-12-09 Thread Robert Brown
Rob Dixon writes: > Tom Kinzer wrote: > I didn't think it was slick at all. In fact I was disappointed that > it looked such a mess, but I don't see a better way. Yes, it is indeed a mess, not only syntacticly, but also semantically. While it might make a good teaching example to show what y

Re: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote: I have 2 Linux boxes I want to talk to each other over the local network using a Perl script. Is it possible to set up a bidirectional pipe so that 2 perl daemons can communicate with each other? How would I go about doing this and are there any m

RE: How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread Tim Johnson
Your first step should be to read the contents of "perldoc perlipc". Then you will probably be able to ask more specific questions on how to go about it. -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 1:19 PM To: Perl Beginners Subject

Re: Syntax a little funny ....

2003-12-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > On 12/08/03 19:33 or thereabouts, John W. Krahn scribbled: > > [EMAIL PROTECTED] wrote: > > > If that is so, what is all that business with the curly braces ? > > > I thought curly braces are supposed to denote code sections ? > > > > Yes, exactly, the curly braces all

How do I set up bidirectional pipes over a network connection?

2003-12-09 Thread Dan Anderson
I have 2 Linux boxes I want to talk to each other over the local network using a Perl script. Is it possible to set up a bidirectional pipe so that 2 perl daemons can communicate with each other? How would I go about doing this and are there any modules to help? Thanks in advance, Dan -- To

Re: Pattern Match

2003-12-09 Thread Rob Dixon
Tom Kinzer wrote: > > Rob Dixon wrote: > > > > Eric Sand wrote: > > > > > > I am very new to Perl, but I sense a great adventure ahead after just > > > programming with Cobol, Pascal, and C over the last umpteen years. I have > > > written a perl script where I am trying to detect a non-printin

index syntax change, base36 conversion?

2003-12-09 Thread Robert Brown
Wiggins d Anconia writes: > While attempting to figure out a way to do conversion of large (overly) > integers from base 10 to base 36, and back again I naturally went to > CPAN and looked at Math::Base36, which appears to have a bug in its use > of 'index' to determine if a character is not a

Re: Recommendations?

2003-12-09 Thread Philipp Traeder
Hi Derek, On Tue, 2003-12-09 at 21:01, Derek Brinson wrote: > Where might I find reference (conceptual) stuff about how to launch a > JAVA app via CGI (or vice versa)? Could you specify what kind of Java application you're talking about? The Java *applications* (as opposed to servlets, EJBs etc.

Re: Pattern Match

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 2:37 PM, Tom Kinzer wrote: Rob, can you explain the details of that replace? That's pretty slick. I see you're adding the hex value to get to the appropriate ASCII value, but didn't know you could do some of that gyration inside a regex. The big secret there is the /e modifi

RE: Pattern Match

2003-12-09 Thread Tom Kinzer
Rob, can you explain the details of that replace? That's pretty slick. I see you're adding the hex value to get to the appropriate ASCII value, but didn't know you could do some of that gyration inside a regex. Thanks. -Tom Kinzer -Original Message- From: Rob Dixon [mailto:[EMAIL PROTE

Re: Recommendations?

2003-12-09 Thread drieux
On Dec 9, 2003, at 12:01 PM, Derek Brinson wrote: [..] Where might I find reference (conceptual) stuff about how to launch a JAVA app via CGI (or vice versa)? Still working it out, but it appears that I may need to get some CGI variables into a JAVA App. [..] The direction might be of concern. You

Re: Recommendations?

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 2:01 PM, Derek Brinson wrote: Where might I find reference (conceptual) stuff about how to launch a JAVA app via CGI (or vice versa)? Still working it out, but it appears that I may need to get some CGI variables into a JAVA App. Surely this is too difficult to be encapsulated i

index syntax change, base36 conversion?

2003-12-09 Thread Wiggins d Anconia
While attempting to figure out a way to do conversion of large (overly) integers from base 10 to base 36, and back again I naturally went to CPAN and looked at Math::Base36, which appears to have a bug in its use of 'index' to determine if a character is not a valid base36 character, at least by th

Recommendations?

2003-12-09 Thread Derek Brinson
Where might I find reference (conceptual) stuff about how to launch a JAVA app via CGI (or vice versa)? Still working it out, but it appears that I may need to get some CGI variables into a JAVA App. Surely this is too difficult to be encapsulated in a website or two? -d

Re: Pattern Match

2003-12-09 Thread Rob Dixon
Eric Sand wrote: > > I am very new to Perl, but I sense a great adventure ahead after just > programming with Cobol, Pascal, and C over the last umpteen years. I have > written a perl script where I am trying to detect a non-printing > character(Ctrl@ - Ctrl_) and then substitute a printing AS

RE: Who can I tell what perl modules I have installed ?

2003-12-09 Thread Holler, Lesley W
perldoc perllocal -will show the modules YOU have installed -Wade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 1:50 PM To: [EMAIL PROTECTED] Subject: Who can I tell what perl modules I have installed ? Is there an easy way to li

Re: removing duplicate lines

2003-12-09 Thread Rob Dixon
Andrew Gaffney wrote: > > Rob Dixon wrote: > > > > Andrew Gaffney wrote: > > > > > I am writing a Perl script to automatically generate a netlogon.bat file for > > > Samba > > > whenever a user logs onto a domain. The only parameter that is passes to it is > > > the > > > username. My problem is

Who can I tell what perl modules I have installed ?

2003-12-09 Thread ebone+perl
Is there an easy way to list out all the perl modules I have installed ? I can list out everything in /usr/lib/perl/ but i figure there must be a better way ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sendmail error: No reciient address found in header

2003-12-09 Thread Wiggins d Anconia
Please bottom post > I got it. I never thought indentation could cause sendmail to mess up. > As a beginner, I need you try > everything possible to know their pros and cons. Next time - I may > consider using a CPAN module. > :-) > > Thanks I would disagree here, as a beginner you shoul

Re: removing duplicate lines

2003-12-09 Thread Andrew Gaffney
Rob Dixon wrote: Andrew Gaffney wrote: I am writing a Perl script to automatically generate a netlogon.bat file for Samba whenever a user logs onto a domain. The only parameter that is passes to it is the username. My problem is that different groups get some of the same mappings. What I really n

[ADMIN] Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Casey West
It was Tuesday, December 09, 2003 when david took the soap box, saying: : Drieux wrote: : : > In PART because with things like the Internet, IF : > one wants to learn, one can and at far cheaper rates. : : if this is a joke, it's laughable. if it's not a joke, you are laughable. Picking a random

Pattern Match

2003-12-09 Thread Eric Sand
Hi All, I am very new to Perl, but I sense a great adventure ahead after just programming with Cobol, Pascal, and C over the last umpteen years. I have written a perl script where I am trying to detect a non-printing character(Ctrl@ - Ctrl_) and then substitute a printing ASCII sequence such a

Re: command line commands passed to perl script?

2003-12-09 Thread drieux
On Dec 9, 2003, at 8:38 AM, Paul Kraus wrote: [..] Nameofperlscript command1 command2 command3 Params stored in global variable @ARGV ben, the alternative of course is to look into perldoc Getopt::Long where you can do many majical voodoo with... Oh dear, just found my old DOG about getopt

Re: removing duplicate lines

2003-12-09 Thread Rob Dixon
Andrew Gaffney wrote: > > I am writing a Perl script to automatically generate a netlogon.bat file for Samba > whenever a user logs onto a domain. The only parameter that is passes to it is the > username. My problem is that different groups get some of the same mappings. What I > really > need to

Re: pid of process opened by system

2003-12-09 Thread david
[EMAIL PROTECTED] wrote: > This doesn't work, because system forks itself: > > Parent > `- child1 (opened by fork) > `- child2 (opend by system of child1) > yes and sorry i misunderstood your question. david -- s,.*,<<,e,y,\n,,d,y,.s,10,,s .ss.s.s...s.sss.s.ss s.s.s...

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Jason Dusek
Hi Everyone, I would like to suggest that we drop the thread or bring it to focus on something less invidious than students vs. townies. I think it goes without saying that academia has many faults - but the autodidact is often a victim of his own whims and idiosyncracies. If this thread is t

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread david
Drieux wrote: > In PART because with things like the Internet, IF > one wants to learn, one can and at far cheaper rates. if this is a joke, it's laughable. if it's not a joke, you are laughable. david -- s,.*,<<,e,y,\n,,d,y,.s,10,,s .ss.s.s...s.sss.s.ss s.s.s...s...s..s ...

removing duplicate lines

2003-12-09 Thread Andrew Gaffney
I am writing a Perl script to automatically generate a netlogon.bat file for Samba whenever a user logs onto a domain. The only parameter that is passes to it is the username. My problem is that different groups get some of the same mappings. What I really need to do is filter out duplicate line

RE: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Robert Brown
Wiggins d Anconia writes: > > > > please let's do a split(/\s/, "Perl Programmer"). > > > > this return one array with two scalar: > > Perl > > Programmer > > > > that's why > > > > Back to semantics, define "Programmer". Your definition of programmer, > if it requires any knowl

Re: sendmail error: No reciient address found in header

2003-12-09 Thread B. Fongo
I got it. I never thought indentation could cause sendmail to mess up. As a beginner, I need you try everything possible to know their pros and cons. Next time - I may consider using a CPAN module. :-) Thanks Wiggins d'Anconia wrote: B. Fongo wrote: It's my first time to use sendmail. I want

RE: SMTP From field using MIME::Lite

2003-12-09 Thread Paul Harwood
I want to be able to add a display name as well. For example: Paul Harwood instead of the SMTP address. > I wrote the following code: > > MIME::Lite->send('smtp', "mail.myserver.com", Timeout=>60); > > $msg = MIME::Lite->new( > From =>"[EMAIL PROTECTED]", >

Re: command line commands passed to perl script?

2003-12-09 Thread B. Fongo
You should use this: testscript.pl blah where blah is the value to pass. Ben Crane wrote: Hi all, Sorry, should have added this to my last email. Does anyone know how to pass values to a perl script through the command line? Do you use param as in CGI scripting/ I want a user to be able to s

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Rob Dixon
Drieux wrote: > [snip OP] > > first off you really SHOULD NOT scare people > with phrases like " write microcode for " and > then refer to a four digit chipset. WAY BAD FORM. > { and yes, doing the Motorola side of the assembler > on a RISC was much easier, none of that reverse > polish notation sm

Re: sorter script [was: Frustrated newbie question]

2003-12-09 Thread drieux
On Dec 9, 2003, at 7:45 AM, Bryan Harris wrote: [..] Heck, why don't they just rewrite sort in perl if it's that much faster? since you asked... 8-) ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: wildcard File::Copy

2003-12-09 Thread drieux
On Dec 9, 2003, at 8:12 AM, Ben Crane wrote: [..] $string2 = "$string[1]".".*"; copy("$string2","$destination") || warn "could not copy files: $!"; It does not appear that $string2 is a FileHandle glob - which I think is your issue here. cf: perldoc -f glob perldoc File::Glob ciao

Re: sorter script with *MANY* unique records

2003-12-09 Thread Robert Brown
John W. Krahn writes: > Bryan Harris wrote: > > > > >> Sometimes perl isn't quite the right tool for the job... > > >> > > >> % man sort > > >> % man uniq > > > > > > If you code it correctly (unlike the program at the URL above) then a > > > perl version will be more efficient and faster

Re: pid of process opened by system

2003-12-09 Thread perl-beginners
On Mon, Dec 08, 2003 at 06:48:17PM -0800, david wrote: > eval{ > > local $SIG{ALRM} = sub { die 'alarm' }; > > $child = fork; > > die 'fork' unless(defined $child); > > if($child){ > #-- > #-- give child 5 seconds to complete >

RE: SMTP From field using MIME::Lite

2003-12-09 Thread Paul Kraus
> I wrote the following code: > > MIME::Lite->send('smtp', "mail.myserver.com", Timeout=>60); > > $msg = MIME::Lite->new( > From =>"[EMAIL PROTECTED]", > To =>'[EMAIL PROTECTED]', > > Subject =>"TEST",

SMTP From field using MIME::Lite

2003-12-09 Thread Paul Harwood
I wrote the following code: MIME::Lite->send('smtp', "mail.myserver.com", Timeout=>60); $msg = MIME::Lite->new( From =>"[EMAIL PROTECTED]", To =>'[EMAIL PROTECTED]', Subject =>"TEST",

RE: command line commands passed to perl script?

2003-12-09 Thread Paul Kraus
Nameofperlscript command1 command2 command3 Params stored in global variable @ARGV > -Original Message- > From: Ben Crane [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 09, 2003 11:23 AM > To: [EMAIL PROTECTED] > Subject: command line commands passed to perl script? > > > Hi all

command line commands passed to perl script?

2003-12-09 Thread Ben Crane
Hi all, Sorry, should have added this to my last email. Does anyone know how to pass values to a perl script through the command line? Do you use param as in CGI scripting/ I want a user to be able to specify certain parameters for the perl script (in case they want to run an overnight scheduler

wildcard File::Copy

2003-12-09 Thread Ben Crane
Hi all, Anyone know how to do a wildcard file::copy? E.g. I want to copy a file with a certain name but different extensions. I have tried concatenating ".*" to the end of a filename (without an extension obviously) but it fails. This is what I had in mind...it's just a scribble and not exactly t

Re: sorter script [was: Frustrated newbie question]

2003-12-09 Thread Bryan Harris
> Bryan Harris wrote: >> Sometimes perl isn't quite the right tool for the job... % man sort % man uniq >>> >>> If you code it correctly (unlike the program at the URL above) then a >>> perl version will be more efficient and faster than using sort and uniq. >> >> Please e

Re: perl and qmail aliases

2003-12-09 Thread Andrew Gaffney
Dan Muey wrote: I wrote a Perl script that runs a query against a MySQL db to get a list of customer email addresses. This script then takes a full email for input and rewrites the 'To' header and sends it with qmail-inject for each email address from the db. I have an alias set up in qmail t

Re: Getting a local file

2003-12-09 Thread Rob Dixon
Jason Chinnes wrote: > > Thanks for your reduction of the code, and for your input in general. I > have tried http://localhost/ w/o a file name. In a browser, I get the > apache generated directory index. From the script, however, I get the > same hanging behavior untill it times out. In regard

Re: This seems to ease

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 1:28 AM, [EMAIL PROTECTED] wrote: I didn't know "List::Util", but I have something done by myself. Probably everyone that don't know this module has one. List::Util is a standard module now and worth a look. perldoc List::Util James -- To unsubscribe, e-mail: [EMAIL PROTECTE

Re: What are the dangers of leaving a cgi-bin directory CHMOD 777

2003-12-09 Thread Wiggins d Anconia
> > On Dec 8, 2003, at 3:15 PM, Dan Anderson wrote: > > > > > I have a perl script that writes to its directory, and as such > > the directory is CHMOD 777 in my cgi-bin. (Linux box) I figured this > > might be dangerous, but didn't think there was any harm in it. Am I > > right or w

Re: Problems installing modules on OS X Panther

2003-12-09 Thread James Edward Gray II
On Dec 9, 2003, at 3:37 AM, Stephan Hochhaus wrote: Hello list! I am starting to dig deeper into Perl, after having successfully written my first working script :-) I am trying to install modules on my Mac OS X 10.3 Server machine, but I usually end up getting errors like this for the GD packag

RE: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Wiggins d Anconia
> please let's do a split(/\s/, "Perl Programmer"). > > this return one array with two scalar: > Perl > Programmer > > that's why > Back to semantics, define "Programmer". Your definition of programmer, if it requires any knowledge of UML, is so strict that it will not work in 99% of circles

RE: perl and qmail aliases

2003-12-09 Thread Dan Muey
> I wrote a Perl script that runs a query against a MySQL db to > get a list of customer email > addresses. This script then takes a full email for input and > rewrites the 'To' header and > sends it with qmail-inject for each email address from the > db. I have an alias set up in > qmail tha

RE: Getting a local file

2003-12-09 Thread Jason Chinnes
Rob, Thanks for your reduction of the code, and for your input in general. I have tried http://localhost/ w/o a file name. In a browser, I get the apache generated directory index. From the script, however, I get the same hanging behavior untill it times out. In regardes to your comment:

Re: Getting a local file

2003-12-09 Thread Rob Dixon
Hi Jason. Jason Chinnes wrote: > > I am using mod_perl with Apache 1.3 (Win32) and am having difficulty > with the following code. > > -- > use CGI; > use Data::Dumper; > use HTTP::Request; > use LWP::UserAgent; > > my $q = new CGI; > $ua = new LWP::UserAgent; > $site = 'http://www.example

Re: passing code inside function

2003-12-09 Thread Rob Dixon
Hi Marcos. First let's remove some fog from your code. Your anonymous subroutine sub {$_ = 5;} is returning the value '5' because that's the value of the assignment operator '='. The assigment to $_ is serving no useful purpose as $_ isn't used anywhere else. So we can reduce this to sub {

RE: @INC paths on an IIS server

2003-12-09 Thread Ron Goral
-Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 8:42 PM To: Ron Goral Cc: Perl Beginners Subject: Re: @INC paths on an IIS server This strikes me as strange, because I have never had any problems using module placed correctly in relativ

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Tassilo von Parseval
On Tue, Dec 09, 2003 at 01:43:06AM -0800 drieux wrote: > On Dec 9, 2003, at 1:24 AM, Tassilo von Parseval wrote: > [..] > >>hypothetical question, > >> > >>would one need to be a perl-porter > >>to write good perl? > [..] > > let us get simple. > > how about answering the simple question. > > i

Re: sorter script [was: Frustrated newbie question]

2003-12-09 Thread John W. Krahn
Bryan Harris wrote: > > >> Sometimes perl isn't quite the right tool for the job... > >> > >> % man sort > >> % man uniq > > > > If you code it correctly (unlike the program at the URL above) then a > > perl version will be more efficient and faster than using sort and uniq. > > Please explain...

RE: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread Marcos . Rebelo
please let's do a split(/\s/, "Perl Programmer"). this return one array with two scalar: Perl Programmer that's why -Original Message- From: drieux [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 11:01 AM To: Perl Perl Subject: Re: The True Path to Learning Perl Re: [OT] Educa

Re: The True Path to Learning Perl Re: [OT] Education Level

2003-12-09 Thread drieux
On Dec 9, 2003, at 1:57 AM, [EMAIL PROTECTED] wrote: Before I can say that I'm a Perl Programmer, I have to say that I'm a Programmer. why? ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: passing code inside function

2003-12-09 Thread Tassilo von Parseval
On Tue, Dec 09, 2003 at 09:14:52AM +0100 [EMAIL PROTECTED] wrote: > I would like to read something about passing code inside function. Lets say > that: > > This works: > perl -e 'sub a(&){print(&{$_[0]}, "/n"};$_=0; a {$_++} foreach 1..100' > > This don't work > perl -e 'sub a{print(&{$_[0]}, "/

  1   2   >