Hi Agnello, some comments on your code.
On Monday 18 Apr 2011 15:18:22 Agnello George wrote: > Hi > > I am trying my hand in CGI , i have script that runs svn list on-submit > which obviously takes 30 to 40 secs for the page to load , i plan to use a > ajax loader to be printed untill those 30 to 40 seconds. But even after > the page has finished loading i can still see the image. I am not good in > java script but can this be done using perl only .. here is a snip of my > code .. Please include your entire code - not a snippet of it. > > > my @all_svn; > > unless (@all_svn) { This will always be executed since @all_svn is empty. > print '<p> <img alt="" src="http://192.168.1.25/template/ajax-loader.gif" > /></p>'; > } > @all_svn = qx(svn list -R $virticals{$sitei}{svnurl}) ; 1. You've misspelled "verticals". 2. What is "sitei"? 3. Be careful from interpolating strings into qx/.../ : http://community.livejournal.com/shlomif_tech/35301.html > > s/\s+$// for @all_svn; Subversion has Application Programmers Interfaces (APIs) for that, so you don't need to parse its output non-reliably. > > my %allsus = map {$_ => 1 } @filesi; What is "filesi"? What is "allsus"? > my @allgood = grep {defined $allsus{$_ } } @all_svn ; > print "@allgood"; Here you can have a cross site scripting attack: http://community.livejournal.com/shlomif_tech/35301.html Best Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/ I also have versions of this code in COBOL.NET, Intercal, PDP-10 Assembly, J, APL, Windows NT 4.0 Batch script and Autocad Lisp - I'm sure you can handle all of them because none of them is Perl. ;-). Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/