Solved

perl

Posted on 2011-09-29
5
412 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
  • 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 500 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Coldfusion RegEx 8 72
Regex to filter only IP's? 4 58
Regular Expression 1-100 with two digits 15 60
Debugging a shell script 3 31
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

821 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