Perl, 35 bytes

Include +1 for `-p`

    perl -pe'<>=~s%\S%*_=s/$&//i?_:0%reg;$_=!//'

Then give the strings as 2 consecutive lines on STDIN

A more abusive solution is 30 bytes:

    perl -ne'<>=~s%\w%1/!s/$&//i%reg;1/!//'

This crashes if the strings are not anagrams and therefore gives a false exit code from the point of view of the shell. It also gives garbage on STDERR for that case. If the strings are anagrams the program is silent and gives a "true" exit code