User Tools

Site Tools


kurs:chomp_vs_chop.pl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:chomp_vs_chop.pl [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +use strict;
 +use warnings;
  
 +my $input = <​STDIN>;​
 +
 +printf "​input:​ [%s]\n",​ $input;
 +
 +my $return = chomp($input);​
 +printf "​return:​ [%s] input: [%s]\n",​ $return, $input;
 +
 +$return = chop($input);​
 +printf "​return:​ [%s] input: [%s]\n",​ $return, $input;
 +</​code>​
kurs/chomp_vs_chop.pl.txt ยท Last modified: 2014/09/10 21:22 (external edit)