Forum: Perl Apr 20th, 2009 |
| Replies: 4 Views: 1,650 or try $dir = "x:\\share1\\share2";
if (-d $dir);
{
print $dir," exists\n";
}
else
{
print $dir," not found\n";
} |
Forum: Perl Mar 28th, 2008 |
| Replies: 23 Views: 3,091 heres some more hints:
(1) do not attempt to look for "return" statements. at all.
(2) only use the open/close brace counting method.
(3) you need to change your regex method. merely... |
Forum: Perl Mar 28th, 2008 |
| Replies: 23 Views: 3,091 (1) do not just blindly replace = with == , there was only one place where this was an issue
if($openCount==$closeCount)
(2) SOME functions can have NO "return" statements (void) ... but ANY... |
Forum: Perl Mar 27th, 2008 |
| Replies: 23 Views: 3,091 in case it's not clear...
your parsing method will count the opening brace in line 6, but not the closing brace in line 10 |
Forum: Perl Mar 26th, 2008 |
| Replies: 23 Views: 3,091 1) i noticed in your earlier code you were using = when you should have been using ==
2) you also had a do statement without a corresponding while condition. avoid do/while's for this and other... |
Forum: Perl Mar 25th, 2008 |
| Replies: 23 Views: 3,091 for one thing, you cant put the begin/end of line operators (^ and $) inside parentheses. they must be immediately adjacent to the match operator like this
/^ ...regex... $/
for another... |
Forum: Perl Mar 18th, 2008 |
| Replies: 23 Views: 3,091 it isn't "necessarily" always at the first spot.
but the regex should be correct.
post more code. use [code=c] tags, please |
Forum: Perl Mar 17th, 2008 |
| Replies: 23 Views: 3,091 as for checking whether or not it is a function... each subroutine in C starts with one or more return type:
int, long, short, double, float, void, char, unsigned ...
then it has a single word... |
Forum: Perl Mar 17th, 2008 |
| Replies: 23 Views: 3,091 easiest way is to
(1) do a dir (ls) listing of directory contents, parse each one for a .c extention. start with the first .c file...
(2) open the .c file for READ, to a file handle.
(3)... |