my $sub= eval "sub { my($x)=@_; return ($x/2)**4 }"; die $@ if $@; for my $x ( 0..100 ) { $x /= 10; my $y= $sub->( $x ); plot( $x, $y ); }