<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Perl Script Question: Including a Variable as Part of a Filepath</title>
	<atom:link href="http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/</link>
	<description>Jason J. Thomas&#039; Weblog: Now with more cowbell!</description>
	<lastBuildDate>Wed, 25 Jan 2012 16:18:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Jason J. Thomas</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-6919</link>
		<dc:creator>Jason J. Thomas</dc:creator>
		<pubDate>Wed, 13 Dec 2006 17:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-6919</guid>
		<description>My scripting-fu is strong, as I was able to get this to work as expected.  Kneel before JJT!  

Hey, mokie, there&#039;s a few things you are missing to be the typical UNIX ass: a beard and suspenders.  Once you do that, you will fit the mold.  ;-)</description>
		<content:encoded><![CDATA[<p>My scripting-fu is strong, as I was able to get this to work as expected.  Kneel before JJT!  </p>
<p>Hey, mokie, there&#8217;s a few things you are missing to be the typical UNIX ass: a beard and suspenders.  Once you do that, you will fit the mold.  <img src='http://www.baltimoremick.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason J. Thomas</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-44766</link>
		<dc:creator>Jason J. Thomas</dc:creator>
		<pubDate>Wed, 13 Dec 2006 17:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-44766</guid>
		<description>My scripting-fu is strong, as I was able to get this to work as expected.  Kneel before JJT!  &lt;br&gt;&lt;br&gt;Hey, mokie, there&#039;s a few things you are missing to be the typical UNIX ass: a beard and suspenders.  Once you do that, you will fit the mold.  ;-)</description>
		<content:encoded><![CDATA[<p>My scripting-fu is strong, as I was able to get this to work as expected.  Kneel before JJT!  </p>
<p>Hey, mokie, there&#8217;s a few things you are missing to be the typical UNIX ass: a beard and suspenders.  Once you do that, you will fit the mold.  <img src='http://www.baltimoremick.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mokiejovis</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-6917</link>
		<dc:creator>mokiejovis</dc:creator>
		<pubDate>Wed, 13 Dec 2006 16:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-6917</guid>
		<description>Here, I&#039;ll be the typical UNIX ass:

Why would you want to do that? No one should ever have to do that. Furthermore, I know how to do exactly what you&#039;d want to do, but since no one should ever need to do that, I won&#039;t tell you, and my assholery will be visible to google searchers for years to come.

Seriously though, I don&#039;t even touch that stuff. Perl is greek to me.</description>
		<content:encoded><![CDATA[<p>Here, I&#8217;ll be the typical UNIX ass:</p>
<p>Why would you want to do that? No one should ever have to do that. Furthermore, I know how to do exactly what you&#8217;d want to do, but since no one should ever need to do that, I won&#8217;t tell you, and my assholery will be visible to google searchers for years to come.</p>
<p>Seriously though, I don&#8217;t even touch that stuff. Perl is greek to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mokiejovis</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-44765</link>
		<dc:creator>mokiejovis</dc:creator>
		<pubDate>Wed, 13 Dec 2006 16:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-44765</guid>
		<description>Here, I&#039;ll be the typical UNIX ass:&lt;br&gt;&lt;br&gt;Why would you want to do that? No one should ever have to do that. Furthermore, I know how to do exactly what you&#039;d want to do, but since no one should ever need to do that, I won&#039;t tell you, and my assholery will be visible to google searchers for years to come.&lt;br&gt;&lt;br&gt;Seriously though, I don&#039;t even touch that stuff. Perl is greek to me.</description>
		<content:encoded><![CDATA[<p>Here, I&#8217;ll be the typical UNIX ass:</p>
<p>Why would you want to do that? No one should ever have to do that. Furthermore, I know how to do exactly what you&#8217;d want to do, but since no one should ever need to do that, I won&#8217;t tell you, and my assholery will be visible to google searchers for years to come.</p>
<p>Seriously though, I don&#8217;t even touch that stuff. Perl is greek to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason J. Thomas</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-6912</link>
		<dc:creator>Jason J. Thomas</dc:creator>
		<pubDate>Wed, 13 Dec 2006 15:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-6912</guid>
		<description>Paul: Hmmm...that&#039;s good to know.  I am just dangerous with Perl, and now I get to become moreso.  It just sucks that I have to run it on Windows.  

R.O.B.: That was the answer I was looking for.  I wanted to make sure that I had the concatenation right.  I will be seeing if this works in short order.  

As for the randomness, I am really just picking from a bunch of text files, so I could care less.  As long as it randomizes what it picks, that works.  No need for it to be secure.  ;-)</description>
		<content:encoded><![CDATA[<p>Paul: Hmmm&#8230;that&#8217;s good to know.  I am just dangerous with Perl, and now I get to become moreso.  It just sucks that I have to run it on Windows.  </p>
<p>R.O.B.: That was the answer I was looking for.  I wanted to make sure that I had the concatenation right.  I will be seeing if this works in short order.  </p>
<p>As for the randomness, I am really just picking from a bunch of text files, so I could care less.  As long as it randomizes what it picks, that works.  No need for it to be secure.  <img src='http://www.baltimoremick.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason J. Thomas</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-44764</link>
		<dc:creator>Jason J. Thomas</dc:creator>
		<pubDate>Wed, 13 Dec 2006 15:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-44764</guid>
		<description>Paul: Hmmm...that&#039;s good to know.  I am just dangerous with Perl, and now I get to become moreso.  It just sucks that I have to run it on Windows.  &lt;br&gt;&lt;br&gt;R.O.B.: That was the answer I was looking for.  I wanted to make sure that I had the concatenation right.  I will be seeing if this works in short order.  &lt;br&gt;&lt;br&gt;As for the randomness, I am really just picking from a bunch of text files, so I could care less.  As long as it randomizes what it picks, that works.  No need for it to be secure.  ;-)</description>
		<content:encoded><![CDATA[<p>Paul: Hmmm&#8230;that&#8217;s good to know.  I am just dangerous with Perl, and now I get to become moreso.  It just sucks that I have to run it on Windows.  </p>
<p>R.O.B.: That was the answer I was looking for.  I wanted to make sure that I had the concatenation right.  I will be seeing if this works in short order.  </p>
<p>As for the randomness, I am really just picking from a bunch of text files, so I could care less.  As long as it randomizes what it picks, that works.  No need for it to be secure.  <img src='http://www.baltimoremick.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notorious R.O.B.</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-6909</link>
		<dc:creator>Notorious R.O.B.</dc:creator>
		<pubDate>Wed, 13 Dec 2006 14:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-6909</guid>
		<description>Haven&#039;t used Perl 6, so I don&#039;t know if they&#039;ve fixed this, but if I may draw back several years when I programmed in Perl, you&#039;ll want to add the &quot;.&quot; character to concatenate the pieces of $logfile.  For example:

my $logfile = “F:/dir1/dir2/tip” . $random_number . ”.txt”;

Another thing - as I&#039;m sure you know, random numbers aren&#039;t truly random.  I don&#039;t know how secure this needs to be, but you can use the srand function before calling rand to change the seed used.

If you want something even more random than that, there&#039;s a package called Math::TrulyRandom that you can find in CPAN.</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t used Perl 6, so I don&#8217;t know if they&#8217;ve fixed this, but if I may draw back several years when I programmed in Perl, you&#8217;ll want to add the &#8220;.&#8221; character to concatenate the pieces of $logfile.  For example:</p>
<p>my $logfile = “F:/dir1/dir2/tip” . $random_number . ”.txt”;</p>
<p>Another thing &#8211; as I&#8217;m sure you know, random numbers aren&#8217;t truly random.  I don&#8217;t know how secure this needs to be, but you can use the srand function before calling rand to change the seed used.</p>
<p>If you want something even more random than that, there&#8217;s a package called Math::TrulyRandom that you can find in CPAN.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notorious R.O.B.</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-44763</link>
		<dc:creator>Notorious R.O.B.</dc:creator>
		<pubDate>Wed, 13 Dec 2006 14:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-44763</guid>
		<description>Haven&#039;t used Perl 6, so I don&#039;t know if they&#039;ve fixed this, but if I may draw back several years when I programmed in Perl, you&#039;ll want to add the &quot;.&quot; character to concatenate the pieces of $logfile.  For example:&lt;br&gt;&lt;br&gt;my $logfile = “F:/dir1/dir2/tip” . $random_number . ”.txt”;&lt;br&gt;&lt;br&gt;Another thing - as I&#039;m sure you know, random numbers aren&#039;t truly random.  I don&#039;t know how secure this needs to be, but you can use the srand function before calling rand to change the seed used.&lt;br&gt;&lt;br&gt;If you want something even more random than that, there&#039;s a package called Math::TrulyRandom that you can find in CPAN.</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t used Perl 6, so I don&#8217;t know if they&#8217;ve fixed this, but if I may draw back several years when I programmed in Perl, you&#8217;ll want to add the &#8220;.&#8221; character to concatenate the pieces of $logfile.  For example:</p>
<p>my $logfile = “F:/dir1/dir2/tip” . $random_number . ”.txt”;</p>
<p>Another thing &#8211; as I&#8217;m sure you know, random numbers aren&#8217;t truly random.  I don&#8217;t know how secure this needs to be, but you can use the srand function before calling rand to change the seed used.</p>
<p>If you want something even more random than that, there&#8217;s a package called Math::TrulyRandom that you can find in CPAN.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-6877</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 12 Dec 2006 21:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-6877</guid>
		<description>yes you can use a variable inside an open() statement. for example:

Convert.pl:open(FILEIN,&quot; $OutputFile&quot;) &#124;&#124; die &quot;open() on $OutputFile failed. $!\n&quot;;

and if you want to go (perhaps) overboard youc an do things like this: 

 open(ACTIVE_HOSTS, &quot;$NMAP $NMAP_OPTIONS -PT \
$PingPort $NETWORK &#124; \
$GREP -v \&quot;Nmap run completed\&quot; &#124; \
$GREP -v \&quot;Starting nmap\&quot; &#124; \
$GREP -v \&quot;TCP probe port is\&quot; &#124;&quot;) &#124;&#124;  \
       die &quot;failed to open pipes: $!\n&quot;;
push(@ActiveHosts,);
close(ACTIVE_HOSTS);

You now have the resulst of that nmap (minus the grep -v&#039;s) in the array ActiveHosts.</description>
		<content:encoded><![CDATA[<p>yes you can use a variable inside an open() statement. for example:</p>
<p>Convert.pl:open(FILEIN,&#8221; $OutputFile&#8221;) || die &#8220;open() on $OutputFile failed. $!\n&#8221;;</p>
<p>and if you want to go (perhaps) overboard youc an do things like this: </p>
<p> open(ACTIVE_HOSTS, &#8220;$NMAP $NMAP_OPTIONS -PT \<br />
$PingPort $NETWORK | \<br />
$GREP -v \&#8221;Nmap run completed\&#8221; | \<br />
$GREP -v \&#8221;Starting nmap\&#8221; | \<br />
$GREP -v \&#8221;TCP probe port is\&#8221; |&#8221;) ||  \<br />
       die &#8220;failed to open pipes: $!\n&#8221;;<br />
push(@ActiveHosts,);<br />
close(ACTIVE_HOSTS);</p>
<p>You now have the resulst of that nmap (minus the grep -v&#8217;s) in the array ActiveHosts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/comment-page-1/#comment-44762</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 12 Dec 2006 21:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://baltimoremick.com/blog/2006/12/12/perl-script-question-including-a-variable-as-part-of-a-filepath/#comment-44762</guid>
		<description>yes you can use a variable inside an open() statement. for example:&lt;br&gt;&lt;br&gt;Convert.pl:open(FILEIN,&quot; $OutputFile&quot;) &#124;&#124; die &quot;open() on $OutputFile failed. $!n&quot;;&lt;br&gt;&lt;br&gt;and if you want to go (perhaps) overboard youc an do things like this: &lt;br&gt;&lt;br&gt; open(ACTIVE_HOSTS, &quot;$NMAP $NMAP_OPTIONS -PT &lt;br&gt;$PingPort $NETWORK &#124; &lt;br&gt;$GREP -v &quot;Nmap run completed&quot; &#124; &lt;br&gt;$GREP -v &quot;Starting nmap&quot; &#124; &lt;br&gt;$GREP -v &quot;TCP probe port is&quot; &#124;&quot;) &#124;&#124;  &lt;br&gt;       die &quot;failed to open pipes: $!n&quot;;&lt;br&gt;push(@ActiveHosts,);&lt;br&gt;close(ACTIVE_HOSTS);&lt;br&gt;&lt;br&gt;You now have the resulst of that nmap (minus the grep -v&#039;s) in the array ActiveHosts.</description>
		<content:encoded><![CDATA[<p>yes you can use a variable inside an open() statement. for example:</p>
<p>Convert.pl:open(FILEIN,&#8221; $OutputFile&#8221;) || die &#8220;open() on $OutputFile failed. $!n&#8221;;</p>
<p>and if you want to go (perhaps) overboard youc an do things like this: </p>
<p> open(ACTIVE_HOSTS, &#8220;$NMAP $NMAP_OPTIONS -PT <br />$PingPort $NETWORK | <br />$GREP -v &#8220;Nmap run completed&#8221; | <br />$GREP -v &#8220;Starting nmap&#8221; | <br />$GREP -v &#8220;TCP probe port is&#8221; |&#8221;) ||  <br />       die &#8220;failed to open pipes: $!n&#8221;;<br />push(@ActiveHosts,);<br />close(ACTIVE_HOSTS);</p>
<p>You now have the resulst of that nmap (minus the grep -v&#8217;s) in the array ActiveHosts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

