In case it makes a difference, is your platform *nix, Windows or Mac?
I don't know much about http or curl but before using the system command make sure the $cmd variable has been built successfully. You may want to use Perl's quote operator qq().
#!/usr/bin/perl -w
use strict;
my $cmd = "c:\\curl\\curl -X PUT -d \"user[email]=email$_\" "
+ "-d \"user[password]=pass$_\" "
+ "http://localhost:3000/site/users/user$_";
#For now, comment out the system command and see if $cmd contains correct string value
##print "create user failed\n" if system($cmd);
print $cmd;
Running the above gives a lot of error messages.
C:\Users\David\Programming\Perl>test.pl
Use of uninitialized value $_ in concatenation (.) or string at C:\Users\David\P
rogramming\Perl\test.pl line 3.
Use of uninitialized value $_ in concatenation (.) or string at C:\Users\David\P
rogramming\Perl\test.pl line 3.
...etc....... d5e5
Practically a Posting Shark
804 posts since Sep 2009
Reputation Points: 157
Solved Threads: 157