select the correct answer

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

 I came across this question in my office ,Im having my own idea
regarding this ,  so please tell your views and explanation if

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

sub foo {
my $data = shift;
if ($data =~ /^([-\w.]*)$/) {
return $1;
} else {
die "Bad data in $data\n";
my $line = <STDIN>;
$line = foo($line);

Question: When is code similar to the above code used in a perl
program ?

a. When most data is required as a scalar
b. When running setuid perl scripts that must securely use user-
supplied data
c. When preparing a function that will eventually check data for
specific criteria
d. When wanting to have a function return a string form of a parameter
e. When any string data must contain at least one character

Re: select the correct answer

Alexander Jack wrote:
Quoted text here. Click to load it


Re: select the correct answer

Quoted text here. Click to load it


Do your own homework.

Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg0cm.j.dat/"

Site Timeline