[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Self Aware Data routines?




#!/usr/local/bin/perl -wT

# A script that shows how to
# write data-aware routines...

use strict;
use diagnostics; # -verbose;

my $vSub = '';

while (<DATA>) {
    no strict q/refs/;
    $vSub = \m/^(.+)$/io;
    &$$vSub if defined &$$vSub;
    print "Sorry, I don't see a Subroutine
           $$vSub\n" unless defined &$$vSub;
}

exit;

sub Sneex {
print "Hi from Sneex...\n";
}

sub TheCat {
print "Hi from SnittyMibs!\n";
}

__DATA__
Sneex
TheCat
NoSubr


Comments?
-Sneex-  :]
FCCJ Data Security Group
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org