What it chompdoes is remove the value $/from the end of the argument line (or $_if there is no argument). So the equivalent regular expression would be:
s#\Q$/\E\z
Note the use of a different delimiter for s///, to avoid variable problems $/.
, . , .