in reply to How to specify a Null char in a match operation
It's not so much that you aren't able to generate a string or detect the null, it is more likely that things go awry in subsequent processing. Consider:
use strict; use warnings; my @strs = ("filename1.txt\0", "filename2\0.txt", "filename3.txt"); /\0/ && ((print "Null char detected in >$_<"), print "\n") for @strs;
Prints:
Null char detected in >filename1.txt Null char detected in >filename2
Note that print has truncated the strings at the null character. A sign that C is at work under the hood.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to specify a Null char in a match operation
by shmem (Chancellor) on Oct 11, 2006 at 09:28 UTC | |
by swampyankee (Parson) on Oct 11, 2006 at 19:58 UTC | |
|
Re^2: How to specify a Null char in a match operation
by ikegami (Patriarch) on Oct 14, 2006 at 07:58 UTC | |
by GrandFather (Saint) on Oct 14, 2006 at 10:37 UTC | |
|
Re^2: How to specify a Null char in a match operation
by Nik (Initiate) on Oct 11, 2006 at 09:15 UTC | |
by bart (Canon) on Oct 11, 2006 at 11:07 UTC | |
by demerphq (Chancellor) on Oct 11, 2006 at 12:31 UTC |