#!/usr/bin/perl -w # Open our datafile open(INPUT, '< graduate.output.txt') or die "Couldn't open the file for reading\n"; # build a data structure @url_info = <INPUT>; close(INPUT); while(1){ print "Pick a number: "; chomp($index = <STDIN>); next if ($index >= scalar(@url_info)); if($index =~ /^q/i){ last; } @f = split(/,\s*/, $url_info[$index]); print "Link: $f[0]\n"; }
In reply to Re: Why is my array empty?
by telesto
in thread Why is my array empty?
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |