in reply to weird error when using substring function

Use File::Basename module it will be safe always find one liner code perl -MFile::Basename -e'print basename ("/home/gubendran/Opportunity.sql")'