Re: Regex assistance

2005-12-17 Thread M. Lewis
Charles K. Clarkson wrote: M. Lewis wrote: : But I don't think the following regex is really doing that: : : /micr[qw]o[-]ca[a]p[k][s]/i : : Suggestions, corrections welcome. /Microcap|Micro-cap|MicroCaap|Micrqocap|MicrwoCap|MicroCapks/ One advantage of t

RE: Regex assistance

2005-12-17 Thread Charles K. Clarkson
M. Lewis wrote: : But I don't think the following regex is really doing that: : : /micr[qw]o[-]ca[a]p[k][s]/i : : Suggestions, corrections welcome. /Microcap|Micro-cap|MicroCaap|Micrqocap|MicrwoCap|MicroCapks/ One advantage of this regex is that new obfuscat

beginners@perl.org

2005-12-17 Thread Charles K. Clarkson
JupiterHost.Net wrote: : I tried this also but stil can't do FH: : : fake_print "wee"; : is easy *but* : fake_print STDERR "wee"; : : :( what a fun little challenge :) Eek. It's the missing (and expected) comma, I suppose. Perhaps a source filter would help, thoug

Regex assistance

2005-12-17 Thread M. Lewis
I'm trying to match some obfuscations in some spam. The words that I'm trying to catch are: Microcap Micro-cap MicroCaap Micrqocap MicrwoCap MicroCapks But I don't think the following regex is really doing that: /micr[qw]o[-]ca[a]p[k][s]/i Suggestions, corrections welcome. -- . REAL

beginners@perl.org

2005-12-17 Thread JupiterHost.Net
For an Acme module I'm trying to make an alternative to print, but can;t get goto to work with print: I'd like this: perl -mstrict -wle 'sub x {goto &print} x("hi");' to work like this: perl -mstrict -MCarp -wle 'sub x {goto &Carp::croak } x("hi");' I'm sure I'm missing a simple namespace i

beginners@perl.org

2005-12-17 Thread JupiterHost.Net
Charles K. Clarkson wrote: JupiterHost.Net wrote: : For an Acme module I'm trying to make an alternative to print, but : can;t get goto to work with print: : : I'd like this: : : perl -mstrict -wle 'sub x {goto &print} x("hi");' : : to work like this: : : pe

beginners@perl.org

2005-12-17 Thread Charles K. Clarkson
JupiterHost.Net wrote: : For an Acme module I'm trying to make an alternative to print, but : can;t get goto to work with print: : : I'd like this: : : perl -mstrict -wle 'sub x {goto &print} x("hi");' : : to work like this: : : perl -mstrict -MCarp -wle 'sub x {

beginners@perl.org

2005-12-17 Thread John W. Krahn
JupiterHost.Net wrote: > Howdy, Hello, > For an Acme module I'm trying to make an alternative to print, but can;t > get goto to work with print: > > I'd like this: > > perl -mstrict -wle 'sub x {goto &print} x("hi");' > > to work like this: > > perl -mstrict -MCarp -wle 'sub x {goto &Carp::

beginners@perl.org

2005-12-17 Thread JupiterHost.Net
Howdy, For an Acme module I'm trying to make an alternative to print, but can;t get goto to work with print: I'd like this: perl -mstrict -wle 'sub x {goto &print} x("hi");' to work like this: perl -mstrict -MCarp -wle 'sub x {goto &Carp::croak } x("hi");' I'm sure I'm missing a simple n

Re: Constant Hash problem

2005-12-17 Thread John W. Krahn
Shawn Corey wrote: > John W. Krahn wrote: >> You can't because perl implements constants using subroutines and >> subroutines >> can only return a list. > > Perl subroutines return only lists but it converts them to hashes > automatically: > > #!/usr/bin/perl > > use strict; > use warnings; > >

Re: A question about modules

2005-12-17 Thread vishal malik
I see. That's fine then. I didn't know that you were using the package name as a prefix to the subroutine name (DBConn::). In that case you don't need to use the Exporter. You only need it if you want to use the the subroutines as if they were in the current package (for example, db1(), and not

Re: A question about modules

2005-12-17 Thread Shawn Corey
Robert wrote: I simply use: my $dbh = DBConn::db1(); It does the right connection (i.e. subroutine) from the DBConn package and I didn't use Exporter. I should also mention that DBConn is in the same folder and the calling script so maybe that makes a difference. No, it doesn't. You can mix

Re: Constant Hash problem

2005-12-17 Thread Shawn Corey
John W. Krahn wrote: You can't because perl implements constants using subroutines and subroutines can only return a list. Perl subroutines return only lists but it converts them to hashes automatically: #!/usr/bin/perl use strict; use warnings; use Data::Dumper; sub list_to_hash { retu

Re: Looking for good Perl projects

2005-12-17 Thread vishal malik
I don't know if my answer would help. I was in the same shoes as you are. I was experienced in Java and not in Perl. My supervisor gave me a project to write JMS (Java Messaging Service) applications in perl, since it is much easier to access system resources in Perl. So, I used a Perl module c

Looking for good Perl projects

2005-12-17 Thread Just Another
Hello all, I am sure many before me asked this question. Could not locate it in archive. So here I am. I am new to Perl but not to programming. I have experience with software development using Java and J2EE (back-end). I want to learn Perl. I believe doing a project is the best way to learn it.