I would recommend both but start with C++ as most suggested here. I have notcied that most exploits posted are in C.

I know Perl pretty well and will comment on the power of it that I have discovered...

Perl is great for the following:
[list=a][*]Great for LAN and system administrative tasks[*]Working with text files: logs, reports, etc[*]Has great regular expression searching[/list=a]

SAMS has a learn perl in 21 days book which is descent beginner book. O'Reilly has some good intermediate Perl books.

Hope this helps, enjoy!