User Profile

Collapse

Profile Sidebar

Collapse
bdan44
bdan44
Last Activity: Oct 20 '08, 07:12 AM
Joined: Apr 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bdan44
    replied to missing return statement
    in Java
    try doing something like this
    [code=java]
    public boolean addHouse ( House a ) {
    boolean done = false;
    for (int i = 0; i < collection.leng th; i++)
    {
    if (collection[i] == null && done == false)
    {
    collection[i] = a;
    done = true;
    // REMOVE THIS LINE return true;
    ...
    See more | Go to post
    Last edited by Nepomuk; Oct 20 '08, 02:55 PM. Reason: Added [CODE] tags

    Leave a comment:


  • bdan44
    replied to Perl in Java
    in Java
    bumping again. if you have knowledge, please help.
    See more | Go to post

    Leave a comment:


  • bdan44
    replied to Perl in Java
    in Java
    bumping to top
    See more | Go to post

    Leave a comment:


  • bdan44
    replied to Perl in Java
    in Java
    yes. the perl script needs some user input. however, the java program doesn't provide an oppurtunity for the user to provide said input, or at least it doesn't in its present state.
    See more | Go to post

    Leave a comment:


  • bdan44
    started a topic Perl in Java
    in Java

    Perl in Java

    HI,

    I have a perl script that I want to call in java. I can call it, the only problem is that the perl script has <STDIN> and the perl sciprt doesn't work. Other perl scripts(without <STDIN>) do work however. here is my code:

    Code:
    import java.util.*;
    import java.io.*;
    class Rename {
    	public static void main(String args[]) {
    		try {
    			Runtime r = Runtime.getRuntime();
    ...
    See more | Go to post

  • bdan44
    started a topic Perl in Java
    in Java

    Perl in Java

    HI,
    I have a perl script that I want to call in java. I can call it, the only problem is that the perl script has <STDIN> and the perl sciprt doesn't work. Other perl scripts(without <STDIN>) do work however. here is my code:
    import java.util.*;
    import java.io.*;
    class Rename {
    public static void main(String args[]) {
    try {
    Runtime r = Runtime.getRunt ime();...
    See more | Go to post

  • bdan44
    replied to Open new folder and enter it
    in Perl
    I ended up doing it like this
    chdir('the dir i wanted') || die("couldn't do it");
    mkdir Test;
    chdir(Test) ||die("couldn't do it");

    thanks for you help though
    See more | Go to post

    Leave a comment:


  • bdan44
    replied to Open new folder and enter it
    in Perl
    Code:
    mkdir Test;
    use Cwd();
    $path = getcwd(); #Get the current path
    $path =~ s/\\/\//sg;
    opendir(DIR, $path) || die ("cannot open the path");
    AND

    Code:
    mkdir Sample;
    opendir(DIRHANDLE, "/Sample");
    but those didn't work. they both can create a directory but they won't enter it
    See more | Go to post
    Last edited by miller; Apr 12 '07, 01:54 AM. Reason: Code Tag and Reformatting

    Leave a comment:


  • bdan44
    started a topic Open new folder and enter it
    in Perl

    Open new folder and enter it

    Hi, i am trying to create a new folder and then enter the new folder. I have tried to do this but have failed on all attempts. any help would be greatly appreciated.
    See more | Go to post

  • bdan44
    replied to Renaming File Extensions
    in Perl
    hi,
    what I want the code to do is prompt the user for the extensions they would like to change (if they wanted to change from .mpg to .mpeg they could or from .jpg to .jpeg they could, all with the same script).
    See more | Go to post

    Leave a comment:


  • bdan44
    started a topic Renaming File Extensions
    in Perl

    Renaming File Extensions

    i am a total n00b at perl. i just started learning yesterday. I wanted to make a script to rename extentions. this is what i've come up with. i can't figure out why it doesn't work. any help would be appreciated.

    Code:
    #!/usr/bin/perl
    
    print "What ending would you like to change?";
    $ending = <STDIN>;
    chomp($ending);
    
    print "What would you like to change it to?";
    $new_ending
    ...
    See more | Go to post
    Last edited by miller; Apr 10 '07, 08:57 PM. Reason: Code Tag and ReFormatting
No activity results to display
Show More
Working...