#!/usr/bin/env perl @keywd=`cat /home/vikash/maya/keywords`; @operatr=`cat /home/vikash/maya/operators`; print "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"; foreach $keyword (@keywd){print "$keyword";} print "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"; print "\nthe total no. of keywords specified in the file are :($#keywd)\n"; print "hello $ENV{'USER'}, greetings !!! you are "; print "using display $ENV{'DISPLAY'} \n"; $file='/home/vikash/maya/new.c'; print "\n\n:Lexical Analysis Report:\n\n"; print " |-> Input Code File:- $file\n"; print <<"EOF"; \nThe code used in the lexical analysis is :- \n EOF print `cat /home/vikash/maya/new.c`; for($i=0;$i<$#keywd;$i++) { print if /\b^int$\b/; } __END__ #### open(INFO,$file); while(){ print if /\bint\b/; print if /\bfloat\b/; } close(INFO)