[ale] C programming tips

Fletch fletch at phydeaux.org
Tue Jul 2 18:35:51 EDT 2002


>>>>> "Randy" == Randy Janinda <rjaninda at tqlabs.com> writes:

    Randy> Hello everyone, I've finally taken the time to learn C
    Randy> (atleast the basics). I have written a few small utilities
    Randy> and my first C socket code (woo hooo!).  I now need some
    Randy> resources to help me get a handle on string matching.  I
    Randy> come from Perl, where regex's rock and am looking for the
    Randy> some C equivalents to matching words, patterns, etc. So far
    Randy> I've found regcomp() and regexec() but no useful examples
    Randy> on how to use them.  Anyone have pointyers or resources
    Randy> they would like to share?

        Don't bother with C. :)


        Half serious there, but with Inline::C you can use perl for
all of the stuff that's easy in perl and easily incorporate C chunks
where it's necessary (raw speed bit twiddling, talking to hardware,
linking to other libraries).  I'll take


    use IO::Socket::INET ();
    my $sock = IO::Socket::INET->new( PeerAddress => 'foo.bar.com',
                                      PeerPort    => 80, );


        over the 20-30 lines of C necessary to accomplish the same
thing any day.
 
                

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
770 294-0820 (m)      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list