Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!hsdndev!dartvax!eleazar.dartmouth.edu!paw From: paw@eleazar.dartmouth.edu (Pat Wilson) Newsgroups: comp.lang.perl Subject: pop(split()) problems Message-ID: <1991Mar1.182847.20944@dartvax.dartmouth.edu> Date: 1 Mar 91 18:28:47 GMT Sender: news@dartvax.dartmouth.edu (The News Manager) Organization: Project NORTHSTAR Lines: 22 Originator: paw@eleazar.dartmouth.edu I'm new to perl, so please *email* if this is something really obvious: Running perl 3.0.1.10, pl 44, I get compaints about $file = '/tmp/'.(pop(split(/\//,$file))); but the (apparently) equivalent @tmp = split(/\//,$file); $tmp = pop(@tmp); $file = '/tmp/'.$tmp; works just fine (I'm stripping the path off of a filename, and prepending /tmp to the result). According to the book, the first statement _ought_ to work, but perl doesn't seem to like pop(split()). Am I missing something? Will I be able to do this in 4.0? -- Pat Wilson Systems Manager, Project NORTHSTAR paw@northstar.dartmouth.edu