10-18-2012
Yes, I know what you mean. I remember when I was starting with Linux, I didn't understand shell very well, and tried to write most of everything in Perl. This didn't make bash stupid, or eval necessary, I simply didn't know what I was doing.
Quote:
But seriously using eval cannot be so harmful...It's just re-evaluation of strings.
Yes. Yes, it can.
Imagine that you're feeding variables containing filenames into eval. Did you know that
`rm -Rf ~/` is a valid filename?
Using eval lets external things inject whatever code they want into your program unless done very
very carefully. If you don't know enough to avoid eval, you probably don't know how to use it safely either.
Last edited by Corona688; 10-18-2012 at 02:15 PM..
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
If I want to do high-end 3d animation, what skell scripting languages, and programming languages shoul I learn?
If you know any good resources for learning these languages they would be appreciated. (1 Reply)
Discussion started by: aloysius1001
1 Replies
2. UNIX for Advanced & Expert Users
I have never programmed in Perl (insert laughter, mock, etc. here ____) - so I need a sort of "Programming in Perl" covering the basics.
I now have two Perl books, one is a 5 volume Unix resource kit, the other is "Mastering algorithms with Perl" - none of them explains how to produce "hello,... (11 Replies)
Discussion started by: AtleRamsli
11 Replies
3. News, Links, Events and Announcements
Check the essays out.
http://www.paulgraham.com (0 Replies)
Discussion started by: photon
0 Replies
4. What is on Your Mind?
Can someone suggest any online venues to assist in recruiting a senior C programmer (looking for someone interested in working on kerberos code).
I've tried a bunch of the open source and higher ed lists (this is for Univ. of Michigan). The commercial services such as Dice or monster yield a... (7 Replies)
Discussion started by: painman
7 Replies
5. What is on Your Mind?
Post what languages (including scripting) you know, why and where you think that language is most usable. Also include libraries in which you're really good at (libusb, gtk, qt, etc).
assembly?
C or C++?
perl or python?
pascal?
bash or csh/tcsh?
opengl?
gtk or qt?
mono? (27 Replies)
Discussion started by: redoubtable
27 Replies
6. Shell Programming and Scripting
value of i = solarisbox
ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
2 Replies
7. Programming
i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386
hans@mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from... (0 Replies)
Discussion started by: Zabo
0 Replies
8. Forum Support Area for Unregistered Users & Account Problems
When I visit Programmers forum my ESET Nod32 detects TrojanDownloader.Pegel.BH.trojan
I don't know when it started, as I visited the site today after staying off-line a few days. (2 Replies)
Discussion started by: migurus
2 Replies
9. What is on Your Mind?
While working on my current "UNIX history project" I ran across this:
Jerry Saltzer created an online scanned copy of the Multics Systems Programmers' Manual (MSPM) in this directory.
Based on the 1969-04-01 MSPM, the repo comprising 996 PDF files.
In order to help preserver the MSPM, ... (1 Reply)
Discussion started by: Neo
1 Replies
10. What is on Your Mind?
Hi guys and gals...
A mildly humourous blog from 2013, but I come into this category... ;oDD
Languager: The Poorest Computer Users are Programmers (0 Replies)
Discussion started by: wisecracker
0 Replies
LEARN ABOUT REDHAT
extutils::mm_win32
ExtUtils::MM_Win32(3pm) Perl Programmers Reference Guide ExtUtils::MM_Win32(3pm)
NAME
ExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker
SYNOPSIS
use ExtUtils::MM_Win32; # Done internally by ExtUtils::MakeMaker if needed
DESCRIPTION
See ExtUtils::MM_Unix for a documentation of the methods provided there. This package overrides the implementation of these methods, not
the semantics.
constants (o)
Initializes lots of constants and .SUFFIXES and .PHONY
static_lib (o)
Defines how to produce the *.a (or equivalent) files.
dynamic_bs (o)
Defines targets for bootstrap files.
dynamic_lib (o)
Defines how to produce the *.so (or equivalent) files.
perl_script
Takes one argument, a file name, and returns the file name, if the argument is likely to be a perl script. On MM_Unix this is true for
any ordinary, readable file.
pm_to_blib
Defines target that copies all files in the hash PM to their destination and autosplits them. See "DESCRIPTION" in ExtUtils::Install
tool_autosplit (override)
Use Win32 quoting on command line.
tools_other (o)
Win32 overrides.
Defines SHELL, LD, TOUCH, CP, MV, RM_F, RM_RF, CHMOD, UMASK_NULL in the Makefile. Also defines the perl programs MKPATH,
WARN_IF_OLD_PACKLIST, MOD_INSTALL. DOC_INSTALL, and UNINSTALL.
xs_o (o)
Defines suffix rules to go from XS to object files directly. This is only intended for broken make implementations.
top_targets (o)
Defines the targets all, subdirs, config, and O_FILES
manifypods (o)
We don't want manpage process.
dist_ci (o)
Same as MM_Unix version (changes command-line quoting).
dist_core (o)
Same as MM_Unix version (changes command-line quoting).
pasthru (o)
Defines the string that is passed to recursive make calls in subdirectories.
perl v5.8.0 2002-06-01 ExtUtils::MM_Win32(3pm)