User Profile
Collapse
-
Did you properly install the Net::Telnet module? Your code is right out of the modules example code so that shouldn't be the problem, so maybe the module installation wasn't done properly. -
What would be easier is to find hop, store the value you need, then keep going until you find 9227493 then print the value of hop. Repeat and continue until the end of the file.Leave a comment:
-
How come you have not added the filehandle name where you want to redirect output to a file like Jeff showed you?Leave a comment:
-
I've never used curses and don't know anything about it but there is documentation on CPAN:
http://search.cpan.org/~giraffed/Curses-1.27/Curses.pm...Leave a comment:
-
change:
Code:print "$done\n";
Code:print "$done $otherstuff\n";
Leave a comment:
-
Code:open(my $data, "<", "path/to/your/file") or die "$!"; while(my $mystring = <$data>){ print "The input is $mystring"; my ($date, $otherstuff) = split(/\s+/,$mystring); my ($y,$m,$d,$h,$min,$sec) = unpack("A4A2A2Z2Z2Z2",$date); my $done = sprintf ("%d-%2.2d-%d-%d.%d.%d.%06s",$y,$m,$d,$h,$min,$sec,0); print "$done\n";
Leave a comment:
-
What is the filehandle you are using? Is it $FILEHANDLE or SERIALPORT...Leave a comment:
-
-
-
You can change the value of a variable, but not when it is used in a string. When you put a variable in a string its value replaces the variable, and then perl builds the string. The variable is not stored in the string only its value.Leave a comment:
-
I have no clue what you are asking or what you need help with. What does any of this have to do with perl?...Leave a comment:
-
the multiple dots seem to have nothing to do your problem. It appears you are trying to match certain file extensions so you should anchor the regexp to the end of the string:
Code:if(/\.(dts|ts|trp|mpg|TRP)$/)
Leave a comment:
-
The Expect module is probably what you want. If you are on Windows it only works when run in cygwin environment. I never use Expect so can't offer help with its actual usage.Leave a comment:
-
-
He posted this question on a few perl forums and already posted on perlmonks:
http://www.perlmonks.org/?node_id=787151...Leave a comment:
-
-
On my Vista 64 bit with strawberry perl 5.10 I can use a scalar with 257 characters (not including the $ at the beginning). At 258 I get the "identifier too long" error.Leave a comment:
-
Its not an error, its a warning, but it might lead to problems if the variable really does need a value. If the code runs fine, remove the -w flag from the shebang line or if you are using the warnings pragma you can wrap that section of code in a block (if necessary) and use "no warnings".
http://perldoc.perl.org/warnings.html...Leave a comment:
-
You might want to ask on a forum that discusses the operating system you are running, there might be an application you can use that has nothing to do with perl. But as far as perl goes, the only thing that I know of that sounds like it has a chance is Expect....Leave a comment:
-
Very good, that would have have been my next suggestion, check for more than one install of perl. If you have a modern computer strawberry perl seems to work good. The newest version even comes with DBI and the mysql drivers already included, which I am pretty sure activeperl doesn't, although that might not be a benefit for you.
But if you decide to try strawberry perl you have to uninstall activeperl first....Leave a comment:
No activity results to display
Show More
Leave a comment: