Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: perl typecasting

by perl_junkie (Acolyte)
on Feb 05, 2008 at 18:28 UTC ( #666371=note: print w/replies, xml ) Need Help??


in reply to Re: perl typecasting
in thread perl typecasting

TGI, I really appreciate you taking time off to review my code. Thanks..!!!

I am working on my regex skills now. I should get better at it in the coming weeks.

The variables I have not defined are globals.. sorry I should have mentioned that... Your code looks much cleaner and easier to debug than mine...!!!! Thanks a lot...!!!!!

I have got a lot of people telling me about using the modules. Can anyone give me info on how I can check this. Everytime I use this, I get this error message.

"Can't locate Regexp/Common.pm in @INC (@INC contains: /et/pkgs/perl/5.8.0_crm/lib/perl5 /et/pkgs/perl/5.8.0_crm/lib/perl5/site_perl /et/pkgs/perl/5.8.0_crm/lib/site_perl /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at dm.pl line 3."

Replies are listed 'Best First'.
Re^3: perl typecasting
by papidave (Pilgrim) on Feb 06, 2008 at 13:41 UTC
    Junkie,

    Regular expressions may seem awkward at first, but keep at it! Your efforts will pay off in the long run. Perl is a far more powerful language for having them, and you'll be able to do many more things, easier, for being able to use them.

    The Camel (Programming Perl, Wall/Christiansen/Orwant) has a good chapter on Pattern Matching; you can also use 'perldoc perlre' to get an overview. Neither one is probably ideal for a total regexp newbie, however. I learned RE syntax from years of using sed, awk, and vi, so I can't recommend any specific introductory books (although many exist).

    -dave

Re^3: perl typecasting
by ww (Archbishop) on Feb 05, 2008 at 21:22 UTC

    Did your use line look like this?

    use Regexp::Common

    Note the double colon -- not the slash you used in your note.

    ...and did your error end with a line like this?

    BEGIN failed--compilation aborted at 40.pl line 3.

    I mention the first because the first thing that occurs to me is that you tried to

    use Regexp/Common;

    If you used the correct form (as in the first sample above), then IMO, the problem is likely that Regexp::Common is not installed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://666371]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2020-02-23 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (103 votes). Check out past polls.

    Notices?