Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

OeufMayo's scratchpad

by OeufMayo (Curate)
on Jun 03, 2004 at 13:17 UTC ( [id://360118]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    use Text::Balanced qw(extract_codeblock);
    ...
        my ($e,$r) = extract_codeblock $_;
        print "Code: $_\nExtracted: $e\nRemainder: $r\n\$\@: $@\n\n";
    }
    
  2. or download this
    Code: { $h{x}  = "}" }
    Extracted: { $h{x}  = "}" }
    Remainder: 
    ...
    Code: { $h{tr} = "}" }
    Extracted: 
    Remainder: { $h{tr} = "}" }
    
  3. or download this
    #!/usr/bin/perl -w -s
    use strict;
    use Parse::RecDescent;
    ...
    $parser = Parse::RecDescent->new(q({my %foo} rule:"foo"{$foo{y}="}";})
    +);
    $parser = Parse::RecDescent->new(q({my %foo} rule:"foo"{$foo{m}="}";})
    +);
    $parser = Parse::RecDescent->new(q({my %foo} rule:"foo"{$foo{tr}="}";}
    +));
    
  4. or download this
        Parse::RecDescent: Treating "{my %foo}" as an action
        Parse::RecDescent: Treating "rule:" as a rule declaration
        Parse::RecDescent: Treating ""foo"" as an interpolated literal ter
    +minal
    ...
        Parse::RecDescent: Treating ""foo"" as an interpolated literal ter
    +minal
    printing code (3618) to RD_TRACE
    

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 scrutinizing the Monastery: (5)
As of 2024-03-28 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found