Subject: | documentation/behavior issue: print $s->cmd('show access-list'); |
The documentation gives the impression that print should be able to
straightforwardly take the output of "cmd" and spit it to output, but in
a print "cmd" seems to strip newlines which makes good sense in an array
context, but not such great sense in a scalar context.
Seems like either the code should append newlines if the request is in a
scalar context or else the documentation should be adjusted to make the
example do something more directly useful.
OHO! Just discovered that it includes the newlines if I force it to be
scalar either by storing in a scalar or by joining to a scalar:
print '' . $s->cmd('show access-list');
Hmmm...but it turns out that even this is missing the final newline.