The pack doc says:
When unpacking, A strips trailing whitespace and nulls, Z strips everything after the first null, and a returns data with no stripping at all.
Whitespace seems to be the same thing as \s in regexes.
>perl -MData::Dump=pp -E "pp unpack 'A*', qq<aaaa\t\n >"
"aaaa"
>perl -MData::Dump=pp -E "pp unpack 'a*', qq<aaaa\t\n >"
"aaaa\t\n "
>perl -MData::Dump=pp -E "pp unpack 'a*', qq<aaaa\t\n \0>"
"aaaa\t\n \0"
(The last one is because \0 is the padding for 'a' patterns, so I wanted to be sure it wasn't removed)