Re: How to put a global variable in a package, accessible to usersof that package?

2008-11-01 Thread Dr.Ruud
"Mr. Shawn H. Corey" schreef: > 2) Perl does not have true constants. When you `use constant` you > actually create a sub that returns a value. This: > > use constant VAR => "someval"; > > is the same as: > > sub VAR { > return "someval"; > } Perl has true constants. "use constant" isn't

Re: merge 2 or more files together without creating new file

2008-11-01 Thread slow_leaner
On Oct 31, 10:27 am, [EMAIL PROTECTED] (Slow_leaner) wrote: > Hi, > Is there a way I can marge FILE2 into FILE1 or reverse together > without creating a new merge file. I am not sure there are a better > way to do it. If you give me some hint or help, i would appreciate > it. > thx. > Here is my co

Net::ftp

2008-11-01 Thread open . network . design
Im trying to mirror a directory on my computer with another directory with Net FTP. Below is the code im using. Im new to perl and new to Net::FTP so any help would be great! use Net::FTP; use File::Basename; my $ftp; my $host ='example.com'; my $user ='example'; my $dir = "public_html/images/ima

Re: out of memory

2008-11-01 Thread Dr.Ruud
Alert: this is also posted (and being replied on) in news:comp.lang.perl.misc article: news:[EMAIL PROTECTED] -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Why is my regex so slow?

2008-11-01 Thread Dr.Ruud
Jenda Krynicky schreef: > The thing is that if you use > > $something =~ /^$regex$/; > > in a loop, Perl has to copile the regular expression for each > iteration. Because it can't know whether the $regex variable > is still the same or not. (assuming C) I wouldn't directly know how to test it,

Re: merge 2 or more files together without creating new file

2008-11-01 Thread Mr. Shawn H. Corey
On Fri, 2008-10-31 at 13:25 -0700, slow_leaner wrote: > On Oct 31, 10:27 am, [EMAIL PROTECTED] (Slow_leaner) wrote: > > Hi, > > Is there a way I can marge FILE2 into FILE1 or reverse together > > without creating a new merge file. I am not sure there are a better > > way to do it. If you give me so

Re: merge 2 or more files together without creating new file

2008-11-01 Thread Dr.Ruud
slow_leaner schreef: > Slow_leaner: >> Is there a way I can marge FILE2 into FILE1 or reverse together >> without creating a new merge file. I am not sure there are a better >> way to do it. If you give me some hint or help, i would appreciate >> it. What do you exactly mean by "marge" or "merge"

Re: How to put a global variable in a package, accessible to usersof that package?

2008-11-01 Thread John W. Krahn
Dr.Ruud wrote: "Mr. Shawn H. Corey" schreef: 2) Perl does not have true constants. When you `use constant` you actually create a sub that returns a value. This: use constant VAR => "someval"; is the same as: sub VAR { return "someval"; } Perl has true constants. "use constant" isn't t

Re: merge 2 or more files together without creating new file

2008-11-01 Thread John W. Krahn
slow_leaner wrote: On Oct 31, 10:27 am, [EMAIL PROTECTED] (Slow_leaner) wrote: Is there a way I can marge FILE2 into FILE1 or reverse together without creating a new merge file. I am not sure there are a better way to do it. If you give me some hint or help, i would appreciate it. thx. Here is

Re: Net::ftp

2008-11-01 Thread Dermot
2008/11/1 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Hi Dermot, > > The original code will upload a file but not a folder full of files. I need > a way to ftp either: > > 1. ftp the whole folder with all the items inside > 2. have perl read in all the file names and then upload all of them one by > o

Re: Re: Net::ftp

2008-11-01 Thread ringlink
or consider to use rsync tool, that's simple and effective enough. - Original Message - From: Dermot To: [EMAIL PROTECTED] Subject: Re: Net::ftp Date: 2008-11-2 05:45:32 2008/11/1 [EMAIL PROTECTED] : You nearly had in. I think you assumed that you could copy a directory and it's files