Yes, of course you can.
You can install an Apache server to any popular PC (Windows, Apple, Linux) to use as your Web Server, and use your browser to test the web pages you write. (Windows has something specific to Microsoft, but why bother? Apache works on everything, it's free, and the vast majority of web servers use it.)
If it's Windows, you can install Strawberry Perl. Otherwise, just install regular Perl, which for non-Windows is probably already there anyway.
Of course, if you want the General Public to visit your pages, you'll have to get a paid web hosting service. But you still might want just the local set up for practice. Upload it to your public service after you've tested it locally.
Search for public web hosting services, such as GoDaddy, HostGator, etc. There might be some free ones, but they're generally free by forcing your pages to present advertising.
But if you just want the practice for school assignments or learning, don't bother with the web hosting services. Just hook up your own machine with Apache and Perl. Once you get it working with Apache and Perl, no matter the platform, you'll be able to eventually migrate it to a web hosting service when you're ready.