Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

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

Thanks pvaldes and GrandFather, I have tried both of your methods. Both methods lead me to the same error:

syntax error at ./scriptfile line 55, near "if !~"

I should also have mentioned that the $TestFile also contains other options used in the script, which is initially the reason for why i used a foreach loop. here is the code if it helps any:

foreach $Line (<TESTFILE>) { next if ($Line =~ m/^#/); if ($Line =~ m/option1\s*=\s*(.*)/) { $option1 = $1; print "option1 = <$option1>\n"; } if ($Line =~ m/option2\s*=\s*(.*)/) { $option2 = $1; print "option2 = <$option2>\n"; } if ($Line =~ m/option3\s*=\s*(.*)/) { $option3 = $1; print "option3 = <$option3>\n"; } if ($Line =~ m/option4\s*=\s*(.*)/) { $option4 = $1; print "option4 = <$option4>\n"; } # if ($Line =~ m/To\s*=\s*(.*)/) { # $To = $1; # print "To = <$To>\n"; # } if ($Line =~ m/option6\s*=\s*(.*)/) { $option6 = $1; print "option6 = <$option6>\n"; } if ($Line =~ m/option7\s*=\s*(.*)/) { $option7 = $1; print "option7 = <$option7>\n"; } if ($Line =~ m/option8\s*=\s*(.*)/) { $option8 = $1; print "option8 = <$option8>\n"; } } close(TESTFILE);

In reply to Re: Sending Email to a list of people using Mail::Sender by mlebel
in thread Sending Email to a list of people using Mail::Sender by mlebel

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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found