I have some file in a shared folder on my network which contents I need to insert into a database.
You can just open it like normal:
open my $file, '<', '//xxx.xxx.xxx.xxx/SharedFolder/sample.txt' or die "Oops: $!";
I tested this and it worked for me on Windows.
When scripting you can (and should) use forward slashes in directory paths, even on Windows.