Skip to Content

Programi i pare ne PERL

Perl eshte nje gjuhe programuese apo ma mire te themi skriptuese e cila ka mjaft ngjashmeri me gjuhen programuese C. Kete e ka zbuluar Larry Wall ne vitin 1986. Perl dmth 'practical extraction and report language'. Perl eshte zakonisht e instaluar ne shperndarjet e Linux-it. Nese jo athere mund ta shikoni keshtu:
/usr/bin/perl -version
Ne rastin tim konkret, per GNU/Linux Debian Lenny kam kete version:

This is perl, v5.10.0 built for i486-linux-gnu-thread-multi

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Gjerat teorike rreth kesaj gjuhe programuese jane te shumta ne internet, prandaj po filloj me nje shembull konkret. Si zakonisht ne programim fillohet me programin e pare hello world. Une po e titulloj hallo.pl
Hapim nje gedit dhe shkruajme:
#!/usr/bin/perl -w

print "Tungatjeta Juve\n";
print "Miresevini ne Perl\n";

E bejme kete te dhene te ekzekutueshme:

chmod u+x hallo.pl

Ekzekutimin e ketij programi e bejme keshtu:

perl hallo.pl

E tëra është paraqitur në foton e mëposhtme

Pak skjarime:
/usr/bin/perl eshte vendi ku gjendet perl
print kjo komande e cila eshte edhe tipike ne gjuhen programuese C, bene shtypjen e asaj cka ne deshirojme ne dalje.

P.S Ky eshte programi i pare. Shpresoj se ne vazhdim (varesisht prej kohes), te paraqes edhe programe tjera.