Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

G'day mmkstarr,

Welcome to the Monastery.

"I am wondering how far one can get in pearl without learning regex?"

[Note: the language is called Perl and the program is called perl. A "pearl" is something you'll find in an oyster.]

Perl provides much the same constructs as other programming languages. (See "perlintro -- a brief introduction and overview of Perl".) You can write Perl code without using regexes. However, unless you're coding in total isolation, you will often encounter regexes in code written by others: without being able to understand regexes, you won't get very far. As an absolute bare minimum, I suggest you read, and fully comprehend:

"Is regex fluency a huge boon to a perl user?"

The short answer is: "Yes". Regexes allow you to write very succinct code, often in a single line, which otherwise would require dozens, or even hundreds, of lines of code to accomplish.

Having said that, it's important not to fall into the trap of always reaching for a regex just because it can be used. Perl provides a number of functions and operators which may be more appropriate than a regex and, more often than not, are much faster than the equivalent regex. Here's some examples:

"If so, what are some of the best regex tutorials you have come upon?"

In the first instance, I suggest you look at:

There's a lot of documentation on Perl's regular expressions. Use the following, as required, for reference:

— Ken


In reply to Re: Regex, the jungle survival skill by kcott
in thread Regex, the jungle survival skill by mmkstarr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2024-04-23 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found