#!/usr/bin/perl -- use strict; use warnings; my $str = " a b c d 1 2 3\0"; if( $str =~ /\0\z/ ){ print '$str ends with null hexdump( ', unpack 'H*', $str; print ")\n"; } __END__ $str ends with null hexdump( 206120622063206420312032203300)
In reply to Re: Sensing of Null character
by Anonymous Monk
in thread Sensing of Null character
by himanshu.padmanabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |