Created
April 24, 2013 13:24
-
-
Save atulsingh0/5452098 to your computer and use it in GitHub Desktop.
Perl Code To Print the 1st character of a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
open (FILEHANDLE, "< new.pl") or die "oops: $!"; | |
@each = FILEHANDLE; | |
my $char = getc $each[0]; | |
print $char; | |
close(FILEHANDLE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment