fl0 fl0w Posted April 10, 2007 Report Posted April 10, 2007 My name is fl0 fl0w and i am going to show you a couple of basic things in Perl.Let's begin.ArraysThe beginning of every perl program is :#!/usr/bin/perl -w # This sign is used for comments.Arrays contain values.The join function is used when printing the elements of an array.Algorithm : #!/usr/bin/perl -w@a=qw(Salut ,sunt eu ,fl0 fl0w);print join('',@a);Algorithm #!/usr/bin/perl -w@a=('hello','world','my','name','is','florin');print @a[0]." ".@a[1]." ".@a[2]." ".@a[3]." ".@a[4]." ".@a[5]."\n";I have used the split method,this splits the worls apart with spaces.How do you run the programs ?Simple ,just save them in .PL format and go to CMD and after you instal perl go in to the folder you have saved the program and run it like this : c:\[pach]\ perl name.plfl0 fl0w Quote
dizzy Posted May 10, 2007 Report Posted May 10, 2007 mi se parea mie cunoscut nick-ul tau bhf is better huh? Quote
SlicK Posted May 10, 2007 Report Posted May 10, 2007 flo flow nu te supara dar asta nu e un tutorial. nici macar nu reprezinta "the basics". sunt doar cateva functii aruncate acolo. metoda "split"(de fapt e o functie) pe care spui ca ai folosit-o nici macar nu apare in vreun cod iar functia "join" nu este folosita numai atunci cand tiparesti un elementele unui array. Quote
dizzy Posted May 10, 2007 Report Posted May 10, 2007 sa nu mai zicem ca elementele array-ului nu se afiseaza cu @, deci nu, tutorialul e o gluma Quote
andrewboy Posted May 16, 2007 Report Posted May 16, 2007 este bun si atat pt mine kre nici atata nu stiu in perl 8) Quote