Remove the last characters of a string

perl

Solution

Assume the string is `$s`.

$s = substr $s, 0, -6;

Problem

How can I remove the last six characters of a string using Perl? In my case I need to remove `:00:00` For example ``` goes_2017-05-14_00:00:00 ``` to get ``` goes_2017-05-14_ ```

Original source

Related problems