Re: hey need hep on this please

2012-03-29 Thread lina
On Thu, Mar 29, 2012 at 6:08 PM, John W. Krahn wrote: > my wrote: >> >> The goal of this assignment is to put in practice the list and I/O >> functionalities implemented by Perl. >> >> >> >> Write a program that will read a list from a file (input), will sort >> the list in lexical order and write

Re: hey need hep on this please

2012-03-29 Thread lina
#!/usr/bin/env perl use strict; use warnings; use autodie qw(open close); use 5.012; open my $fh, '<', '/etc/passwd'; open my $fh2, '>', '/tmp/newpasswd'; my $uid; my %h; while(<$fh>){ $uid = (split /\:/, $_)[0]; $h{$uid} = $_; } print $fh2 map "$h{$_}", sort keys %h;

Re: hey need hep on this please

2012-03-29 Thread John W. Krahn
my wrote: The goal of this assignment is to put in practice the list and I/O functionalities implemented by Perl. Write a program that will read a list from a file (input), will sort the list in lexical order and write back the sorted list to another file (output). You can use arrays and any

hey need hep on this please

2012-03-29 Thread my
The goal of this assignment is to put in practice the list and I/O functionalities implemented by Perl. Write a program that will read a list from a file (input), will sort the list in lexical order and write back the sorted list to another file (output). You can use arrays and any of the Perl