Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 19 of 19
Search took 0.09 seconds.
Search: Posts Made By: joeDetroit
Forum: Perl/ CGI 12-06-2011, 08:27 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
-derp- Thanks!

-derp- Thanks!
Forum: Perl/ CGI 12-06-2011, 08:21 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
Last question-- I'm using file locking...

Last question--

I'm using file locking (multiple builds going on at once, so I don't want collisions)

If I put
flock ($newlicense_fh, 2)

in this block
open my $newlicense_fh, '>', $newFile...
Forum: Perl/ CGI 12-06-2011, 04:35 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
That worked... Do the square brackets create...

That worked...

Do the square brackets create a reference?
Forum: Perl/ CGI 12-06-2011, 04:02 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
I put your code in, and then got this when I...

I put your code in, and then got this when I tried to run it:
Can't use string ("1111-1111-1111-1111") as an ARRAY ref while "strict refs" in use at k:\Packages\Packages\MirrorFolder4.1\test5.pl...
Forum: Perl/ CGI 12-06-2011, 03:43 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
I had that in there and hadn't changed it yet,...

I had that in there and hadn't changed it yet, that's all. I wanted to get it working then clean it up (remove all the <STDIN> 'breakpoints' so I knew where I was, etc.)

I'll change it right now....
Forum: Perl/ CGI 12-06-2011, 02:41 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
So, I'm finally able to get back to the script......

So, I'm finally able to get back to the script...

The if (exists... worked great.

Now I'm trying to get the script's output to a file, and I've got some of it, but I have a question (as usual):...
Forum: Perl/ CGI 11-28-2011, 02:26 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
I tried putting $licenses{ $ENV{'COMPUTERNAME'} }...

I tried putting $licenses{ $ENV{'COMPUTERNAME'} } = shift @{ $licenses{ 'UNASSIGNED' } }; in my existing while... loop, and I get the following error:

Odd number of elements in anonymous hash at...
Forum: Perl/ CGI 11-18-2011, 03:39 AM
Replies: 32
Views: 3,588
Posted By joeDetroit
Wow... talk about jumping into the deep end... ...

Wow... talk about jumping into the deep end...

I'll give that a shot at work when I'm more awake.

---EDIT: I reserve the right to ask more dumb (perhaps obvious to seasoned coders) questions...
Forum: Perl/ CGI 11-17-2011, 12:28 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
This definitely helps, especially as it lets me...

This definitely helps, especially as it lets me see duplicates easily.

Ideally, I'd like to be able to assign one of the licenses marked 'UNASSIGNED' to the machine that I'm building, then either...
Forum: Perl/ CGI 11-16-2011, 08:24 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
That makes sense... Thanks for the explanation...

That makes sense... Thanks for the explanation :-)

I was in the middle of posting the output and was pulled away...

Here's what your code (run as-is) produced:
'WPDONCND119BLK8' => [
...
Forum: Perl/ CGI 11-16-2011, 06:30 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
Yes, the machine name and license are separated...

Yes, the machine name and license are separated with a single space, one machine/license key per line. As these are site licenses, there may be more than one machine assigned the same license key:
...
Forum: Perl/ CGI 11-16-2011, 02:27 AM
Replies: 32
Views: 3,588
Posted By joeDetroit
Since the file in question has license keys, I...

Since the file in question has license keys, I cannot (and will not) post it.

I did say in the first post that the file has machine names and keys separated by a space:
myMachine myLicense...
Forum: Perl/ CGI 11-15-2011, 11:43 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
I just tried split /' '/ and split /"' '"/...

I just tried split /' '/ and split /"' '"/ (double quoted single quotes) with same result- an empty $val.

I also threw in use warnings; and got
Use of uninitialized value $val in concatenation...
Forum: Perl/ CGI 11-15-2011, 11:25 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
I think I've figured out the major problem- The...

I think I've figured out the major problem- The my ($key, $val) = split; isn't splitting the data in the file into 2 columns, i.e. the $key has the machine name and the license, and the $val is...
Forum: Perl/ CGI 11-12-2011, 08:41 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
By all means, please point them out! As I...

By all means, please point them out!

As I said, I'm new to perl and I'm happy to learn more.

I'm going to try your change now.

THANK YOU for your help!
Forum: Perl/ CGI 11-12-2011, 04:11 AM
Replies: 32
Views: 3,588
Posted By joeDetroit
I would like to say, even though I'm at a...

I would like to say, even though I'm at a stumbling block, I've learned a lot based on your reply...

Thanks!
Forum: Perl/ CGI 11-12-2011, 04:09 AM
Replies: 32
Views: 3,588
Posted By joeDetroit
OK.. I tried, but my head is about to...

OK.. I tried, but my head is about to explode....

I can't get past the ...while... statement:


#!/usr/bin/perl
use File::Copy;

$strSearchFor = "unassigned";
$setCount = 0;
Forum: Perl/ CGI 11-07-2011, 10:42 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
Hi FishMonger, thanks for the hints. Now I get...

Hi FishMonger, thanks for the hints. Now I get to learn how to use hashes (which is not a bad thing at all).

The script will be called via another script (script-ception? sorry :) ) that will run...
Forum: Perl/ CGI 11-07-2011, 04:46 PM
Replies: 32
Views: 3,588
Posted By joeDetroit
Need help modifying a file for application license assignments

Hello all--

I don't have a lot of Perl experience, so any help would be appreciated!

Here's what I'm trying to do:
We use an application called MirrorFolder to back up our laptops. We have a...
Showing results 1 to 19 of 19

 
Forum Jump

All times are GMT +1. The time now is 03:20 AM.