#!/usr/bin/perl
# usage: look_for_name  - looks for wav files in directory and counts to next one
# The results will be printed to standard output
# Copyright (C) 2002 by Peter Pfrang <peter.pfrang@gmx.de>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# initialisation of the variables (check the path, this may not match to your system!!)
$file_path='/home/geo/amnon';
$filename='record';
$file_ending='.wav';

chdir($file_path);

# Counts the number of Files with the file_ending
foreach (<*$file_ending>)
{
       $i++;
#        system "mpg123 -w wav\/$filename_wav $filename_mp3";
}
$filename='record';
printf "%s\/%s%d%s\n",$file_path,$filename,$i,$file_ending;
