fork download
  1. #!/usr/bin/perl
  2. print "enter first name \n";
  3. $first = <STDIN>;
  4. chomp $first;
  5. print "ënter last name \n";
  6. $last = <STDIN>;
  7. chomp $last;
  8. #transfer scalars into array
  9. @array = ($first, $last);
  10. print "@array \n";
  11.  
Success #stdin #stdout 0s 18256KB
stdin
mansi 
verma
stdout
enter first name 
ënter last name 
mansi  verma