26277 total geeks with 3498 solutions
Recent challengers:
 Welcome, you are an anonymous user! [register] [login] Get a yourname@osix.net email address 

Articles

GEEK

User's box
Username:
Password:

Forgot password?
New account

Shoutbox
MaxMouse
It's Friday... That's good enough for me!
CodeX
non stop lolz here but thats soon to end thanks to uni, surely the rest of the world is going good?
stabat
how things are going guys? Here... boring...
CodeX
I must be going wrong on the password lengths then, as long as it was done on ECB
MaxMouse
lol... the key is in hex (MD5: of the string "doit" without the "'s) and is in lower case. Maybe i should have submitted this as a challenge!

Donate
Donate and help us fund new challenges
Donate!
Due Date: May 31
May Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
I know who "Satoshi
Nakamoto" is, says
Ted Nelson
Google builds
crowdsourcing into
new Maps code stack
Google"s Native
Code browser tech
goes cross-platform
Yahoo! to "share
something special"
in New York on
Monday
Adobe"s Creative
Cloud fails at
being a cloud
NASA signs off on
sampling mission to
Earth-threatening
asteroid
US military
welcomes Apple iOS
6 kit onto its
networks
Jailed Romanian
hacker repents,
invents ATM
security scheme
Climate scientists
agree: Humans cause
global warming
MIT takes
battery-powered
robot cheetah for a
gallop
Slashdot
NetBSD 6.1 Has
Shipped
Charge Your
Cellphone In 20
Seconds
(Eventually)
Yahoo! Japan May
Have Had 22 Million
User IDs Stolen
Ask Slashdot: Why
Do Firms Leak
Personal Details In
Plain Text?
Data Center
Managers Weary of
Whittling Cooling
Costs
Canadian Cellphone
Users May Get
Justice Over
Phantom Charges
Wired Writer
Imagines Google
Island
Syrian Electronic
Army Hits Financial
Times Sites, Feeds
Arduino Branches
Out, With a
Plug-and-Program
Robot
After Kickstarter
Record, Pebble
Smartwatch Lands
$15M From VCs
Article viewer

The eval command



Written by:dimport
Published by:dimport
Published on:2003-06-21 07:19:46
Topic:Miscellaneous
Search OSI about Miscellaneous.More articles by dimport.
 viewed 8742 times send this article printer friendly

Digg this!
    Rate this article :
eval, a mystical command, too bad it just exist in some script languages like Javascript and Perl.

Bah, this commands is'nt as mystical really, it's kinda simple function but can be kinda tricky to code.
How it work
Ok, this is not univerial, there may be a function named eval and does not do just this but this is the general explanation.
The command execute the code putted in it's argv just as if it would have been just "normal" code placed anywhere in the file and yes even if's work, it have to be done in one line thout. :) Example:
eval("print 'hejsan';");
bah, really bad one but anyway, how would I have done it in one line and to make it look simple. ;/, please put a comment with the code if you can come up with one :)
Coding one
If you write a function that execute the code then you can just call it again with "your" argv, just as simple as a eating turkey. :D
Goodbye
cheers /shab

This article was originally written by shab

Did you like this article? There are hundreds more.

Comments:
marissa
2007-01-16 12:20:46
I kind of understand this article but I am only in ninth grade and have never understood a computer's ways...please help!
Anonymously add a comment: (or register here)
(registration is really fast and we send you no spam)
BB Code is enabled.
Captcha Number:


Blogs: (People who have posted blogs on this subject..)
Action
First one on Tue 12th Jan 10pm
Yaw, this is the first blog post, just to begin with something. Nice site here, cool features like OSIDrive, and so on. However, strange that an "OpenSource Institute" uses non-OpenSource softare to host its site (Windows and IIS). It's not correct... I t
bb
A Daily Profanity at dailyprofanity.com on Mon 21st Dec 11am
For anyone who likes viz, and roger mellies profanisaurus. There's a website called amusing daily profanity which dishes up a humorous profanity every day via rss, twitter email and a few other ways. Rather rude words, but very funny in my opinion,
hambone
Blog entry for Wed 25th Nov 7pm on Wed 25th Nov 7pm
wtf i can't do geek 12. I don't know what to do. i want to kill myself becuz of this
haziman
Blog entry for Mon 9th Nov 4am on Mon 9th Nov 4am
for all geekos out there...
echmil
fuck you all!!!!!!!! on Sat 7th Nov 11pm
jag har tjock med tyngate tråkigt-.-
goldie
Blog entry for Tue 5th May 6am on Tue 5th May 6am
import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; import java.io.*; import java.util.Properties; public class SENDMAIL { public void sendMail(String mailServer, String from, String to,
bb
Bubble Graph on Wed 11th Mar 12pm
I love this graph bubble graph http://www.osix.net:80/modules/folder/in dex.php?tid=28125&action=vf
ketan404
My online resume! on Mon 9th Mar 8am
It is here http://www.listoffreelancers.com/profile s/ketankulkarni Simple and clean design. I like this website. Ketan
macrocat
Blog entry for Sun 8th Mar 3pm on Sun 8th Mar 3pm
Another site with some challenges. Basically, I'm linking this to get a measly five points ;O. Hellbound Hackers
Nightscript
Parapsychology - Fri 19th Dec 5am on Fri 19th Dec 5am
Yes i'm crazy but heres what ive been thinking about and it seems more reasonable that a lot of reality. Note that this ties into parapsychology/psychokinesis research. Mind is not over matter. Thats the wrong state of thinking for sure. Look, this


     
Your Ad Here
 
Copyright Open Source Institute, 2006