B
Bruce.Dobson
I am trying to learn some Perl and doing a tutorial which has the following
code.
%grades = ();
print "Enter student names (press <cntrl>+D when done:";
@names = <STDIN>;
chomp @names;
print "\n\n";
print "Enter corresponding grades (press <cntrl>+D when done):";
@scores = <STDIN>;
@grades{@names} = @scores;
It refers to <cntrl>+D as the "end record character", but this does not seem
to work for me when I run the programme.
I installed ActivePerl-5.8.0.806-MSWin32-x86.msi on Windows XP.
Can anybody tell me why I cannot get <Cntrl>+D to work or what I use for the
end record character instead of <Cntrl>+D.
--
Bruce Dobson
8 Prescott Place,
Hamilton,
New Zealand.
Ph 064 7 856 8804 Fax 064 856 8845
Mobile 027 230 7509
code.
%grades = ();
print "Enter student names (press <cntrl>+D when done:";
@names = <STDIN>;
chomp @names;
print "\n\n";
print "Enter corresponding grades (press <cntrl>+D when done):";
@scores = <STDIN>;
@grades{@names} = @scores;
It refers to <cntrl>+D as the "end record character", but this does not seem
to work for me when I run the programme.
I installed ActivePerl-5.8.0.806-MSWin32-x86.msi on Windows XP.
Can anybody tell me why I cannot get <Cntrl>+D to work or what I use for the
end record character instead of <Cntrl>+D.
--
Bruce Dobson
8 Prescott Place,
Hamilton,
New Zealand.
Ph 064 7 856 8804 Fax 064 856 8845
Mobile 027 230 7509