Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

perl

Posted on 2011-09-29
5
Medium Priority
?
428 Views
Last Modified: 2012-05-12

eval dat="$"${nf}_sw_py_th

if [ x$dat != "x" ]

what is the meaning of above statement in perl ?
0
Comment
Question by:damodar4u
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:damodar4u
ID: 36819072
in that case nf is
nf="tato-matty"
0
 
LVL 31

Accepted Solution

by:
farzanj earned 2000 total points
ID: 36819077
Are you sure this is in Perl.  It appears to be Bash (shell scripting).

The if statement is especially in Bash/Ksh.

If statement will be successful (true) if the value of $dat variable is not null.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 36819105
In the first statement, you are trying to form a variable name run time and trying to get the value of that variable.

So

The value of

$tato-matty_sw_py_th

This should be
tato_matty
0
 

Author Comment

by:damodar4u
ID: 36819130
sorry this is not perl... this is shell scripting
0
 
LVL 31

Expert Comment

by:farzanj
ID: 36819143
Yes, I know.  I hope the above answers are making sense.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
We are witnesses that everyone is saying that our children shouldn't "play" with a technology because it is dangerous. This article is going to prove that they are wrong.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question