RE: Use Strict

2005-01-14 Thread Graeme St. Clair
Thanks for the hint - mainly, I'd misplaced the $ sign (story of my life...). The problem is by no means fixed yet, as there are several other components which have been kind of bashed to fit and need to be straightened out, but I think I now know what to do. Rgds, GStC. -Original

Re: Use Strict

2005-01-14 Thread Shaun Fryer
perldoc -f my perldoc -f package perldoc perlmod perldoc Exporter Also along the same lines, you can get rid of alot of the grunt work by using the following on the unix command line (not sure about win32, sorry ... but try anyway). h2xs -AXn ModuleName The result will be a fully

Read Write to file .. need help

2005-01-14 Thread Luinrandir Hernsen
I need to read and write to a file before allowing the anyone else to read or write. I found this on the web.. but it does not work...maybe its my version of perl? http://htmlfixit.com/cgi-tutes/tutorial_Perl_Primer_011_File_manipulation_with_Perl.php File Operation modes: open: $filepath

Re: Read Write to file .. need help

2005-01-14 Thread Ovid
Hi Luinrandir, Anyone know about this? or can I just: #Open to read open (DataFile, $_[0])||die Sorry, I can't open $_[0]\n; flock (DataFile,2); @Data =DataFile; #open to write open DataFile, $_[0])||DieNice3(Can't write to $_[0]); flock (DataFile,2); foreach $Data(@Data) {

RE: Read Write to file .. need help

2005-01-14 Thread Graeme St. Clair
Oddly enough, I was improving the shining hour in a hospital waiting room earlier today by reading the camel book Chapter 23 Security. There is a good discussion of this whole topic, bearing very exactly on what Luinrandir is trying to do. L, if you haven't already got this book Programming Perl

Perl-module/Perl-authen_smb

2005-01-14 Thread ds10025
Hi I'm trying to download/install perl-authen_smb for perl 5.8.1 Where can I download a copy of perl-module for perl 5.8.1 and copy perl-authen_smb for perl 5.8.1? Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: xml and perl help

2005-01-14 Thread Bob Showalter
johnny yu wrote: hello. i am new with perl and working on a program to sort and manage my dvds instead of using windows program. i export the windows data using built in function to make it xml, how can i read this with perl so i can put in mysql? i try xml::simple but it doesn't work.

Re: Regex lookahead problem

2005-01-14 Thread Andrew Black
Can someone explain how lookaheads work and give an example of using one Cheers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: strict and warnings

2005-01-14 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Dave Kettmann) writes: Hello all, I have seen in quite a few posts to the list from the non-beginners, who I think all of us beginners appreciate them taking their time to help us true beginners, make some references to the strict and warnings

A second beginner's question

2005-01-14 Thread Doug Essinger-Hileman
Now that I have the earlier snippet working (and thank you to all who helped), I am working on shuffling my array. Basically, the array is a list of names in the order they will receive a job assignment. Every third week, I want to shuffle the order. I have tested the basics of shuffling the

urlencode and uri_escape

2005-01-14 Thread Peter
Hi all, there seems to be a slight difference between the function urlencode from php and the uri_escape in perl: the encoded result of test !§$%/()= is different: in php: test+%21%22%A7%24%25%26%2F%28%29%3D in perl: test%20%21%22%3F%24%25%26%2F%28%29%3D The difference is the space: in php it

renaming a file

2005-01-14 Thread S E
Hello, I've been trying to apply my fledgling PERL skills to this task which I have encountered a bit of a roadblock. What I want to do is rename 20-100 files in two different directories that are created every morning. They come in a name format such as these: 1st directory:

accessing hash value with -

2005-01-14 Thread radhika sambamurti
Hi, I am the maintenance programmer for this large chunk of code. My question is particular to this syntax: $THE_COMMANDS{$THE_COMMAND}-($THE_COMMAND); Where THE_COMMANDS is a hash %THE_COMMANDS( open = dosomething ); Thus, $THE_COMMANDS{$THE_COMMAND} is nothing but dosomething right? so why

RE: renaming a file

2005-01-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
S E wrote: Hello, I've been trying to apply my fledgling PERL skills to this task which I have encountered a bit of a roadblock. What I want to do is rename 20-100 files in two different directories that are created every morning. They come in a name format such as these: 1st

Re: A second beginner's question

2005-01-14 Thread Lawrence Statton
Now that I have the earlier snippet working (and thank you to all who helped), I am working on shuffling my array. Basically, the array is a list of names in the order they will receive a job assignment. Every third week, I want to shuffle the order. I have tested the basics of shuffling

Re: A second beginner's question

2005-01-14 Thread John W. Krahn
Doug Essinger-Hileman wrote: Now that I have the earlier snippet working (and thank you to all who helped), I am working on shuffling my array. Basically, the array is a list of names in the order they will receive a job assignment. Every third week, I want to shuffle the order. I have tested

Re: accessing hash value with -

2005-01-14 Thread Robert Boone
Hello, Are you sure that %THE_COMMANDS( open = dosomething ); is not %THE_COMMANDS( open = \dosomething ); The \ in front of the makes $THE_COMMAND{open} a code reference. And the way you dereference a code ref is with the - operator. It's the same as if I did. my $open =

Re: Regex lookahead problem

2005-01-14 Thread Dave Gray
On Fri, 14 Jan 2005 07:11:30 +, Andrew Black [EMAIL PROTECTED] wrote: Can someone explain how lookaheads work and give an example of using one Cheers I find the full names of these regex constructs to be quite enlightening: zero-width (positive|negative) look-(ahead|behind) assertion. So

Re: strict and warnings

2005-01-14 Thread JupiterHost.Net
So it costs 3% more every ten million times it runs, the benefits of leaving it in are much more valuabel than 3%/1000 :) Actually, what happens is that importing those pragma cause flags to be set (eg $^H, see `perldoc perlvar`). Perl checks these flags during certain operations. If the

Re: urlencode and uri_escape

2005-01-14 Thread Matt Howard
Peter wrote: Hi all, there seems to be a slight difference between the function urlencode from php and the uri_escape in perl: the encoded result of test !§$%/()= is different: in php: test+%21%22%A7%24%25%26%2F%28%29%3D in perl: test%20%21%22%3F%24%25%26%2F%28%29%3D The difference is the space:

Re: urlencode and uri_escape

2005-01-14 Thread Octavian Rasnita
If I remember well, the + sign is an old style of printing a space and this style was used in web pages that use isindex forms. Teddy - Original Message - From: Matt Howard [EMAIL PROTECTED] To: beginners@perl.org Sent: Friday, January 14, 2005 9:58 PM Subject: Re: urlencode and

Re: A Beginner's problem

2005-01-14 Thread Doug Essinger-Hileman
On 13 Jan 2005 at 7:58, JupiterHost.Net wrote: open (CONTROL1, test.cont); always always test to see if it opened or not: (and don't use double quotes when nothgin is beinf interpolated so Perl doesn't have to check it to see if somethign needs interpolated) open CONTROL1, 'test.cont'

Re: A Beginner's problem

2005-01-14 Thread Lawrence Statton
The script will be scheduled to run every Saturday at noon. When that happens, what happens with the error message? I realize that this is probably rather obvious to those who have worked at *nix for a while, but I am as much a *nix beginner as a Perl beginner. Doug You know, one way

Re: A Beginner's problem

2005-01-14 Thread Alfred Vahau
When that happens, what happens with the error message? The error message remains but it will be printed only if the file cannot be opened for some reason e.g. the file does not exist. That is what the or is there for. but I am as much a *nix beginner as a Perl beginner Stick with Perl and it

Re: A Beginner's problem

2005-01-14 Thread John W. Krahn
Doug Essinger-Hileman wrote: On 13 Jan 2005 at 7:58, JupiterHost.Net wrote: open (CONTROL1, test.cont); always always test to see if it opened or not: (and don't use double quotes when nothgin is beinf interpolated so Perl doesn't have to check it to see if somethign needs interpolated) open

Database handler passing

2005-01-14 Thread Nicolay A. Vasiliev
Hello there! Is this correct to pass DB handle ($dbh) as subroutine parameter? I don't want to make DB connection everytime when I need to get some data from DB. But if I connected once I'd like to pass one db handler. TIA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: xml and perl help

2005-01-14 Thread Todd W
Johnny Yu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello. i am new with perl and working on a program to sort and manage my dvds instead of using windows program. i export the windows data using built in function to make it xml, how can i read this with perl so i can put

Re: Database handler passing

2005-01-14 Thread Chris Devers
On Sat, 15 Jan 2005, Nicolay A. Vasiliev wrote: Is this correct to pass DB handle ($dbh) as subroutine parameter? I don't want to make DB connection everytime when I need to get some data from DB. But if I connected once I'd like to pass one db handler. Of course you can, and should, do