my $students="students.txt";
####
#!/usr/bin/perl
use strict;
use warnings;
open(FH, ">students.txt");
print FH "Perry*Steve*234\nSmith*Jane*456\nJones*Mary*567\n";
close(FH);
my %hash;
my $students = "students.txt";
open(FH, $students) or die("Could not open file!");
while () {
my ($firstname, $lastname, $password) = split (/\*/, $_);
$hash{"$firstname $lastname"} = $password;
}#while
####
#!/usr/bin/perl
use strict;
use warnings;
open(FH, ">students.txt");
print FH "Perry|Steve|234\nSmith|Jane|456\nJones|Mary|567\n";
close(FH);
my %hash;
my $students = "students.txt";
open(FH, $students) or die("Could not open file!");
while () {
my ($firstname, $lastname, $password) = split (/\|/, $_);
$hash{"$firstname $lastname"} = $password;
}#while