Thursday, June 12, 2008

okay i m having trouble with the decession to which phone i should buy. it s between the blackberry perl 8130 in pink. or the strawberry LG. the problem is that the blackberry pearl for tmobile is 300 dollars. and my mom doesnt let me buy it on ebay. and plus even if she did the cheapest one is 109.52$ but i have less than 5 days to bid on it and i only have 30 $ s plus 20 $ my mom will give me. plus 10 $ of my dad- and my uncle will give me 20$ so thats 80 dollars- how am i suppose to get109.52 inless then five days. oh and btw im 11 yrs old. please dont comment if ur gona say im to young for this- bc new s flash im not. i even have a pink laptop. so ha!

I m not a Unix guy but am currently working with it. In one terminal I ssh into a machine- and then telnet into another. In this telnet I spawn an application that accepts commands. I send commands like "moveUp(10)" and others. I wanted to write a program to use on top of this so instead of typing that in- I could just press "up" 10 times- or some other key. Kind of like making shortcut keys. I was going to use perl. I was thinking I could just run the application in a different termnial window to register my key pressed- and have it post the textual commands to the telnet window. Is this possible- and if so how do I do it?

I created a form on an webpage. I then input parameters and submit the form to my perl cgi script. I want the script to create a KML file and prompt the user to save the KML file from Internet Explorer after submitting the form. So...in the perl script- instead of using open(OUTPUT- >outputfilename.kml) and using print OUTPUT "blahblah" for every print statement- do I just use print by itself to popoulate the file- and when its done IE will automatically prompt me to save it? I know that Google Earth uses this method when calling a cgi script. It just outputs the code back to Google Earth viewer simply with the print statement.
In my HTML form- I have <FORM ACTION="http://www.site.com/myscript.cgi>. So I call the script and in my script- I have

print "Content-Type: application/vnd.google-earth.kml+xml \n"
Content-Disposition: attachment; filename="outputfile.kml"\n\n

Are these the key elements I need to call the script? I submit the form and I get nothing back- so I am trying to figure out if it s something in my script. I do parse the $ENV{QUERY_STRING}- just to let you know.

this is what i have so far. (perl)
#!Z://perl

print "please enter the amount of money you would like to convert into coins. \n";
$money = <STDIN>;
$changequarter = $money / 25;
$CQ = int($changequarter);
$D = $money % 25;
$dime = $D / 10;
$DA = int($D);
$N = $D % 10;
$nickle = $N / 5;
$NA = int($nickle);
$P = $nickle % 5;
$penny = int($P);

print " you have $CQ quarters\n";
print " $DA dimes.\n";
print " $NA nickles\n";
print " and $penny pennys\n";

something is wrong with the dimes i think. can anyone be of help?

if(opendir(DIR-$directory)) { # Proess file with NGC
foreach my $filename1 (readdir DIR) {
if ($filename1 =~ /ngc.*\.xml$/i ) {
if (open(NGC_Input-$filename1)) {
$NGC_Update=$filename1;
close (NGC_Input);
}
}
}
}

Someone provided me with the code above to search for any file that has ngc on it. However the code provided also has a specific directory to look for. Is it possbile to remove the directory and just search for file. I tried editing it but nothing seems to work. I m just new in perl so can someone please help??? thank you

No comments: