Second, since you're using Win32::File, it doesn't do any good to try darwin. I eliminated darwin, and I deleted the eval. There was also a problem with &error_dialog being undefined, so I deleted that. Here's what I have so far:use Win32::File qw(:DEFAULT SetAttributes GetAttributes);
#!perl BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use Win32::File qw( :DEFAULT SetAttributes GetAttributes ); my $name = '/root/Desktop/foo.txt'; my $attr = 0; Win32::File::SetAttributes( $name, $attr ); Win32::File::GetAttributes( $name, $attr ); if ( $attr & SYSTEM ) { print "$name has SYSTEM set.\n"; } if ( $attr & HIDDEN ) { print "$name is hidden.\n"; }
In reply to Re: including modules during runtime and dealing with OS specific (constants) code block
by Khen1950fx
in thread including modules during runtime and dealing with OS specific (constants) code block
by periferral
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |