Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi AnomalousMonk

....... using warning; first of all , i used that line before ( use strict; use warning;) at the top of my Perl code and for this reason I omit them. I think i should explain a little bit about my code. I have to m file (from matlab) and I just want to make them work automate as a software. I am very very new into Perl. For this reason I used linux shell commands and it worked fine. Now , There is problem with my code.

.... File name argument I will put my file name in the correct place , thank you.

..... substitution operation without something to substitute As i mentioned before, I have two files each of them has spciefic SOL number which I used grep command to count them and then use it as a variable. $cmd =("grep -e HW1 myhalf1.pdb | wc -l > text1.txt") ; open FILE, "<text1.txt"; my $sol1= do {local $/; <FILE>}; print p ("sol1=$sol1"); As you see I have it before. in the code, which you had posted i just omit this line my $sol1 = 'my new stuff'; because i introduce my variable before. and the next line which have $sol1 is remained intact. s{ (SOL) ^\n* }{$1 $sol1}xmsg;

......about errors i ve added the code into my .pl file and run it. After that I check error_log file in the server and there is no warning. I have just changed the line into this my $filename_in = 'topol1.top'; no error.even not making another file. and i ve checked the file permission too.no problem about the permission.


In reply to Re^3: sed command with variable in perl by samira_saber
in thread sed command with variable in perl by samira_saber

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-23 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found