{
  "$type": "site.standard.document",
  "canonicalUrl": "https://rickymoorhouse.uk/blog/2008/2008-09-16-chop-and-chomp-in-perl",
  "path": "/blog/2008/2008-09-16-chop-and-chomp-in-perl",
  "publishedAt": "2008-09-16T10:23:28.000Z",
  "site": "at://did:plc:r53zv4vpzeihop3aliwyejlu/site.standard.publication/3mos5q3a7jf2w",
  "textContent": "Just a reminder, so I remember the difference! - chomp is a safer version of \"chop\" removes any trailing string that matches what perl thinks is a new line)\n\n$string = \"abcdef\";  \nchop($string) $s is now f, $string is now abcde  \nchomp($string) $string is still now abcde  \n  \n$string = \"abcdefn\";  \nchomp($string) $string is now abcdef",
  "title": "Chop and chomp in perl"
}