#!/usr/bin/perl
use strict;
use warnings;
# File location: projects/myproj/
# File names: myproj.a, myproj_c.a
# This script is in the 'projects' directory.
my $Element = 'myproj/*.a';
# Actual use is like:
# next if not (-f "$Element");
# Test use:
if (-f "$Element") {
print "Found!\n";
} else {
print "NOT Found!\n";
}
####
# FreeBSD script works ...
#!/bin/sh
Element='myproj/*.a'
if [ -f "$Element" ]; then
echo Found!
else
echo NOT Found!
fi
####
rem Windows batch (cmd) works ...
@echo off
if exist "myproj\*.a" (
echo Found!
) else (
echo NOT Found!
)