Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: pattern matching with brackets

by dirac (Beadle)
on Jul 12, 2005 at 09:51 UTC ( [id://474222]=note: print w/replies, xml ) Need Help??


in reply to pattern matching with brackets

This code works if you have functions without { } inside ..
#!/usr/bin/perl -w use strict; my $code = <<'EOC'; #import <stdio.h> #import <time.h> char * point() { printf("[function point]\n"); return "point"; } char * mouse() { printf("[function mouse]\n"); return "mouse"; } EOC my @subs = ( $code =~ /\{([^\{\}]+)\}/g ); print "@subs\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found