|
|
Joined: Oct 2000
Posts: 38
Member
|
Member
Joined: Oct 2000
Posts: 38 |
for some reason that i cant figure out chomp isnt working for me any ideas? It dosent get rid of the n at the end of it so it trys to open it like a /a .txt how can i get it to work? actually i just tried some other ways like chop and search&reaplce and none of them are doing anything. [ February 09, 2001: Message edited by: Wartortle ]
Wartortle I'm supposed to put somthin here?
|
|
|
|
Joined: Feb 2001
Posts: 30
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 30 |
Maybe you should get it in a scalarvariable: like: You get all the variables in @a in the scalar $b, and chomp it... Then split at the , and your done Hope this works.. Well I'm kinda newbie in Perl, so tell me if I'm wrong! Please!
COGITO ERGO SUM
|
|
|
|
Joined: May 2000
Posts: 243
Member
|
Member
Joined: May 2000
Posts: 243 |
you cant chomp arrays, if you want to get rid of the carriage return on each line:
foreach (@a) { chomp $_;
open(B,"$_.txt") or die $!; @b = ; close B; }
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
quote:</font><HR>you cant chomp arrays<HR></BLOCKQUOTE>
Might wanna try that to verify before stating ya can't ;)
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, Arial">code: output: this is stuff in the array thisisstuffinthearray --mark
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
Joined: Oct 2000
Posts: 38
Member
|
Member
Joined: Oct 2000
Posts: 38 |
ok i figured out why its not working.. acutally chomp is working.. for some reason the files its reading that i made it says that each newline i made with my Enter key is unidentified.. i just tried making the files through the program with n and it works fine.. anyone know why it dosent count my Enter key a n? it used to.
[ February 10, 2001: Message edited by: Wartortle ]
Wartortle I'm supposed to put somthin here?
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
That's strange. Are you on a regular windows machine?
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
Joined: Oct 2000
Posts: 38
Member
|
Member
Joined: Oct 2000
Posts: 38 |
yeah im on regular windows.. i recently installed pws (personal web server) and rpgmaker2000 you think one of those could have caused it?
Wartortle I'm supposed to put somthin here?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|