Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Simple way to skip spaces and # comments

by leszekdubiel (Scribe)
on Jul 31, 2020 at 14:36 UTC ( #11120147=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # for f in `seq 40123`; do echo " #alfa beta"; done | perl -e 'use str
    +ict; use warnings; undef $/; my $s = <STDIN>; print length $s, "\n"; 
    +$s =~ /\G (?: \s++ | \# .*+ )++ /xgc; print pos $s, "\n"; '
    481476
    Complex regular subexpression recursion limit (32766) exceeded at -e l
    +ine 1, <STDIN> chunk 1.
    196597
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-10-29 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (269 votes). Check out past polls.

    Notices?