Syntax
chomp VARIABLE chomp( LIST ) chomp |
Definition and Usage
Removes the last character from EXPR, each element of LIST, or $_ if no value is specified.
Return Value
- The character removed from EXPR
- In list context, The character removed from the last element of LIST
Example
#!/usr/bin/perl |
This will produce following result
Choped String is : This is tes |
No comments:
Post a Comment