Hewlett-Packard

  www.hp.com
  www.hp.com

Interview Question

Database Administrator Interview Washington, DC

Was asked to write a perl script to remove empty space at

  end of each line
Tags:
perl
Answer

Interview Answer

1 Answer

0

Use the keyword CHOMP
#! usr/bin/perl
print "How old are you?";
chomp ($age = <>);

vamsi on Feb 5, 2014

Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up