Cheers,use warnings; use Inline C => <<'EOC'; void C_foo(char *a) { dSP; ENTER; SAVETMPS; PUSHMARK(SP); POPMARK; PUSHMARK(SP); XPUSHs(sv_2mortal(newSVpv(a, 0))); PUTBACK; call_pv("foo", G_DISCARD); FREETMPS; LEAVE; } EOC my $string = "AAA:BBB"; C_foo($string); sub foo { $_[0] =~ /^([^:]+):([^:]+)$/; print "$1 - $2\n"; }
In reply to Re: Regexp and Inline::C
by syphilis
in thread Regexp and Inline::C
by m0d
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |