You should be able to reinstall the package with a simple:
# pacman -S perl-libwww
This will only remove perl-libwww:
# pacman -Rdd perl-libwww
Please notice the double -d in the command, if you use --nodeps you have to specify that twice too or combine it with a -d like:
# pacman -R --nodeps --nodeps perl-libwww
# pacman -Rd --nodeps perl-libwww
This removes all the packages which depend on perl-libwww:
# pacman -Rc perl-libwww
From pacmans man page:
-d, --nodeps
Skips dependency version checks. Package names are still
checked. Normally, pacman will always check a packages
dependency fields to ensure that all dependencies are
installed and there are no package conflicts in the
system. Specify this option twice to skip all dependency
checks.
-c, --cascade
Remove all target packages, as well as all packages that
depend on one or more target packages. This operation is
recursive, and must be used with care since it can remove
many potentially needed packages.