Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

valavanp's scratchpad

by valavanp (Curate)
on Aug 16, 2006 at 12:26 UTC ( #567666=scratchpad: print w/replies, xml ) Need Help??

Monk - 07/11/2006

use strict; use warnings; use XML::Twig; use XML::Simple; use DBI; my $dbname="sample"; my $dbh=DBI->connect("DBI:mysql:$dbname",'root',''); print "Database connected\n"; # Get an array of hashes my $recs = $dbh->selectall_arrayref('SELECT * FROM test',{ Columns => +{} }); # Convert to XML where each hash element becomes an XML element my $xml = XMLout( {records => $recs}, NoAttr => 1 ); my $a=scalar($xml); print "$a";
use strict; use warnings; my $color1="chr,red,green,yellow"; my @color1=split(',',$color1); my @colors=("red","black","blue","white","green","orange","yellow","pi +nk", "purple","violet","cyan","magenta","navy","brown","gold"," +lime", "gray","burgundy","silver","clear","teal"); my $color; foreach $color(@color1){ my $i=0; if ($color eq $colors[$i]){ print "$color here\n"; } $i++; }
Pilgrim 08/01/07

Friar 09/04/07

Hermit 18/07/07

Chaplain 25/11/07

Deacon 09/04/08

Curate 14/09/08

UTF Node_id:620803
Log In?

What's my password?
Create A New User
[choroba]: Progress! Nowadays, you can write a Perl script to generate such an anagram!
[GotToBTru]: i like to order my chemicals a-la-carte ambrus ;)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2016-12-06 13:09 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (104 votes). Check out past polls.