#!/usr/bin/perl use strict; use warnings; my $mount_point = '/home'; local *ISMOUNTED; my $mount_point_found = 0; my $mount_pid = open(ISMOUNTED, '/proc/mounts') or die ("Muuuuuuuuuuuh !\n"); WHILE_ISMOUNTED: while() { if ( /(\s$mount_point\s)/) { $mount_point_found = 1; last; } } close(ISMOUNTED); waitpid($mount_pid, 0);