Re: Making use of "use" dynamic ?

2001-06-09 Thread Curtis Poe
--- Hakan Aksu <[EMAIL PROTECTED]> wrote: > thanks for the response. > However my problem is not calling the variables. but calling the module. > > Let says I have this directory structure : > > ~myapp/class1/foo.pm > ~myapp/class2/foo.pm > ~myapp/class3/foo.pm > > and my @INC has "~myapp/" >

RE: Making use of "use" dynamic ?

2001-06-09 Thread Moon, John
Use is a "declaration" so you may want to "use" all of them ... then "call" the one wanted from main ... meaning the name of the sub would need to reflect which "class" "foo1, foo2, foo3" ... perl -e 'print "class ?:"; $class=<>;chomp($class); $sub="foo$class"; &$sub; print "back from <$sub>\n";

Re: Making use of "use" dynamic ?

2001-06-09 Thread Hakan Aksu
thanks for the response. However my problem is not calling the variables. but calling the module. Let says I have this directory structure : ~myapp/class1/foo.pm ~myapp/class2/foo.pm ~myapp/class3/foo.pm and my @INC has "~myapp/" I wan to call : use class?::foo; #dynamic where class? is

Re: Making use of "use" dynamic ?

2001-06-09 Thread fliptop
hkn wrote: > > Can someone please tell me how I can pass variables when using "use" ? > create a file called SomePackage.pm: package SomePackage; our $var = "hello world.\n"; 1; __END__ and in the cgi: #!/usr/bin/perl -w use strict; use SomePackage; print $SomePackage::var; will return h

Making use of "use" dynamic ?

2001-06-09 Thread hkn
Can someone please tell me how I can pass variables when using "use" ? sub foo { my ( $dirname ) = @_; use $dirname::Variables;# Can't get this running. or any other combo # let say if $dirname="Error" e.g: Error/Variables.pm use Error::Variables; # this

RE: Regex question

2001-06-09 Thread Moon, John
Hope this helps ... >perl -e '$str="/blabla/dir/nextdir/name.txt"; ($path,$filenm)=$str=~m/(^.+)\/(\w+\.\w+$)/; print "path=<$path>,file name=<$filenm>\n";' path=,file name= John W Moon -Original Message- From: Bruno Veldeman [mailto:[EMAIL PROTECTED]] Sent: June 09, 2001 16:08 To: [EMA

beginner's addressbook tutorial - step 2 - develop database schema

2001-06-09 Thread fliptop
step 2 is complete, and is available at: http://www.peacecomputers.com/addressbook_toot-step2.html coming next - step 3 - Creating perl classes and our first cgi

Re: Regex question

2001-06-09 Thread fliptop
Bruno Veldeman wrote: > > I have a string with this format "/blabla/dir/nextdir/name.txt" > I want only 'name.txt' in one string and the rest in another string. in this case, i would use split: $location = "/blabla/dir/nextdir/name.txt"; @dirs = split("\/", $location); foreach (@dirs) { print

Regex question

2001-06-09 Thread Bruno Veldeman
Hi, I can't seem to get the regex right for this: I have a string with this format "/blabla/dir/nextdir/name.txt" I want only 'name.txt' in one string and the rest in another string. It would be nice explaining the regex in plain english. Or better, how do I learn to use regex? For now i

why am I still getting these emails

2001-06-09 Thread Page Works
How many times do I have to go through the Unsubscribe to stop these? Anyone?? Shawn http://www.netzero.net

Re: INSERTing problems

2001-06-09 Thread Randal L. Schwartz
> "Dave" == Dave Newton <[EMAIL PROTECTED]> writes: Dave> Randal said: >> Placeholders are even more cool, and require less thinking. Dave> If they're supported, which they aren't under all platforms! They're supported by DBI, so it's *all* platforms. Perhaps you're thinking of the ":1"-st

RE: INSERTing problems

2001-06-09 Thread Dave Newton
Liz said: > I've not done a great deal of Perl, but with VB we always stripped the > apostrophes out before putting variables into SQL statements. I just escape them-why take them out? They do serve a purpose. Randal said: > Placeholders are even more cool, and require less thinking. If they'r

Re[2]: Email on Windows Platform

2001-06-09 Thread Tim Musson
Hey Herb, I like net::smtp also, but I think it is at a lower level than Mail::Mailer so you need to know a little more about smtp to use it. I have not used Mail:: Mailer though. Wednesday, June 06, 2001, 7:39:45 AM, you wrote: HH> I have had great success with Net::smtp. >> I'm wondering how

Re[2]: tutorial proposition (was: Re: Succinct Code, Use of my $var and global vs local)

2001-06-09 Thread Tim Musson
Not sure I would consider myself a beginner either, but I still have a long way to go . And yes I would very much like to see a tutorial like this. AC> I'm not a beginner, but that sounds like a great way to start up a AC> discussion about efficient program development. Go for it! AC> At 02:0

Re: beginner's addressbook tutorial - step 1 - analyzing the project

2001-06-09 Thread mcrawley
You're the God! Keep it coming. We'll be takin it slowly, but, surely. This is the REAL Learning Tool. Stick with us on this one. -- Original Message -- From: fliptop <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Sat, 09 Jun 2001 00:53:15 -040