Answer to Question #16120 in Perl for mohamed

Question #16120
$site=<STDIN>; chomp $site; print "\n"; print "source code\n\n 1 = php\n\n-> "; $code=<STDIN>; chomp($code); if ( $site !~ /^http:/ ) { $site = 'http://' . $site; } if ( $site !~ /\/$/ ) { $site = $site . '/'; } print "\n"; print "-> Target: $site\n"; print "-> Site source code: $code\n"; how i make this script get the target automatic from file.txt
Expert's answer
Inorder to do what you want, you're going to populate a file with
the URL's (preferably one per line). Then, read in the file and
process each URL in turn.
Thethings you're going to research on how to use are things like the open
function and also how to read a file into an array (or just how to
read each line from a file in turn. hint: foreach would work).

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog