17 Nov 2001 jmcnamara   » (Journeyer)


Inline::Awk

Uploaded Inline::Awk to CPAN. This allows you to add awk code to a perl program:

        #!/usr/bin/perl
 
        use Inline AWK;
    
        $num = 5;
        $str = 'ciao';
    
        print square($num), "\n";
        print echo($str),       "\n";
    
        print "Now, back to our normal program.\n"
    
        __END__
        __AWK__
    
        function square(num) {
            return num * num
        }
    
        function echo(str) {
            return str " " str
        }

Whether or not anyone in their right mind would want to do this is open to debate. :-)

First we take Manhattan

Berlin for the next three weeks.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!